www.delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
X-Recipient: | djgpp AT delorie DOT com |
X-Original-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; |
d=gmail.com; s=20210112; | |
h=content-transfer-encoding:in-reply-to:from:references:to | |
:content-language:subject:user-agent:mime-version:date:message-id | |
:from:to:cc:subject:date:message-id:reply-to; | |
bh=b+fK9kiK2jRygjr5GDvn0qrFPRH02tBHl+kfZrxUK24=; | |
b=QM7HrzSt8dAQybFhz2s8ma+ckCDZPWJxJjoASa0iIFekKBL8y2cRaHEOZJsdlEnC9U | |
npzIrPr0GorJSlhA8YpjLN8Aa5RS4CbaPfbKld7I3NONL7ply6mz5/vexrW1Y9xPO3bS | |
0gfvJtwn82uBPKl+AGB3dqxthRI0yzClLe+IqUU0p2efetvAzw0PjUZsLU/HJh3V74Lr | |
bd5RxWZaEJuDKQOwZoZ1fNB+HJwGlBH7lsv9EJTdgt7N/QlQosjbXimFiFt5xxKAwjUi | |
RQZHYz7fDGEXntEMFWgHbjII5gKPCbrjKQzds6srRiLeY+rf2W6Y1Jxtgn+X5URMlB4A | |
mXQQ== | |
X-Google-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; |
d=1e100.net; s=20210112; | |
h=content-transfer-encoding:in-reply-to:from:references:to | |
:content-language:subject:user-agent:mime-version:date:message-id | |
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; | |
bh=b+fK9kiK2jRygjr5GDvn0qrFPRH02tBHl+kfZrxUK24=; | |
b=N+82z3kkcRrdM7nYRt5QFf4FK1Qgg4kY+UKp5+LG4KRk1qpf96zPkCzHjzD3jJqUFn | |
OWRbnodKXJVzyvbHkU8M03XSRuyBWMD8VsV1kaf4A3n5FGJrqc0OKzssUT/eOs2XKalg | |
/+Qq0irTRsUbXeUXmFMdfp3DzzDxCSBuu6+ieJx8eAYuLWtBaFMWCV6h3rDcYT+CcGB6 | |
0+E5Vgv5dvv5EwelFyJQMi8M5s78yG9XUZ0wpnpfyjN6/6YriC4MZy8B2Jh/TgTuXfpY | |
D+0ttfCTxLDNMwu7zoyDd7p5HwvTmrn9wPmUsUE949dzHmMNI9PcriwFCbmzjrdj9PZ2 | |
I2lg== | |
X-Gm-Message-State: | AFqh2kosIn40VpYkKMTzMVP3s9pJPnzIjUcnn6cIo2Mba0au5p45B5/h |
KHSH8iShwPyr7+bNr+7/Wpt55UdxeNSbEg== | |
X-Google-Smtp-Source: | AMrXdXvYsCkOKOeQaXJBVNlw5Ac7I0mIOdNd7Z/CeL2efh5Rl+53kkf+fNk40bXqbbg1VjyWJ8GRSQ== |
X-Received: | by 2002:aa7:c9ca:0:b0:49e:28c1:936c with SMTP id i10-20020aa7c9ca000000b0049e28c1936cmr41442139edt.26.1674852829679; |
Fri, 27 Jan 2023 12:53:49 -0800 (PST) | |
Message-ID: | <82cff092-6dfe-1dfc-7946-cdb84c44e11b@gmail.com> |
Date: | Fri, 27 Jan 2023 21:53:48 +0100 |
MIME-Version: | 1.0 |
User-Agent: | Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101 |
Thunderbird/102.6.1 | |
Subject: | Re: DXE3 with std::vector |
To: | djgpp AT delorie DOT com |
References: | <edefcfee-d1ce-415a-8d1d-525a660fb0d5n AT googlegroups DOT com> |
<CACuL_+CZm++qhEr7PedDmQaTxjZu9d-rVSw1bgPeist7XZ+dpQ AT mail DOT gmail DOT com> | |
<CAA2C=vDPwv5G9DeFKyKFqt39cDDmO4LmDtbtMyoMdRR2xeEkow AT mail DOT gmail DOT com> | |
<3b8f674c-bca3-c679-952e-f8ba5af196e7 AT gmail DOT com> | |
<CAA2C=vBptnTAy2TA-pj5JCbAUJMiXkAAoP_xYFZZJ99iB7v9mQ AT mail DOT gmail DOT com> | |
<500850be-fd64-3f82-a1e1-929903084e9b AT gmail DOT com> | |
<CAA2C=vA0zXX3Sb49WBzU5g1-8dmO5G5wrb3uT+tLRq2LB0wu5Q AT mail DOT gmail DOT com> | |
<3d9271ae-266d-ee7b-853b-984857ced1c8 AT gmail DOT com> | |
<CAA2C=vD6sZpTicPh0xuJ16r76qBZ5BZro6x=9+=Z+P-0f_eRSA AT mail DOT gmail DOT com> | |
<f04cd9db-fe76-219c-bacb-47711df559e2 AT gmail DOT com> | |
<CAA2C=vCv_bpM+iinTcreMJD_gv34Rna3jLspiLFfESFuNxOtoA AT mail DOT gmail DOT com> | |
<af7fa08a-b074-0a4c-5e2f-99299940e3cc AT gmail DOT com> | |
<CAA2C=vB22rof4HPV_dVPy4tVmsmeDMy4G4r2Vx-_YLwOW6C9ug AT mail DOT gmail DOT com> | |
<bbdf1853-5454-93b2-fcf9-2306c6949c86 AT gmail DOT com> | |
<CAA2C=vBDi8gwhVVacnhnP+eufCkMNK4DancpOjnD7ScOWCEF6g AT mail DOT gmail DOT com> | |
<83sffvbux1 DOT fsf AT gnu DOT org> | |
From: | "J.W. Jagersma (jwjagersma AT gmail DOT com) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com> |
In-Reply-To: | <83sffvbux1.fsf@gnu.org> |
Reply-To: | djgpp AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
On 2023-01-27 21:10, Eli Zaretskii (eliz AT gnu DOT org) [via djgpp AT delorie DOT com] wrote: >> From: "Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com> >> Date: Fri, 27 Jan 2023 22:23:40 +0300 >> >> On 1/27/23, J.W. Jagersma (jwjagersma AT gmail DOT com) [via >> djgpp AT delorie DOT com] <djgpp AT delorie DOT com> wrote: >>> On 2023-01-27 19:10, Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com] >>> wrote: >>>>>>> Thanks. It builds fine for me with the patched dxe3gen, no warnings, >>>>>>> both with and without -lgcc. >>>>>> >>>>>> Well, it does not for me, which _is_ a problem. My toolchain is based >>>>>> on >>>>>> gcc-3.4.6 and binutils-2.26.1. >>>>> >>>>> If you comment out the line with "remove(TEMP_O_FILE)", then run >>>>> dxe3gen again, what does "objdump -h dxe_tmp.o" (or -x) show? >>>> >>>> Here you go: >>>> h0.txt and x0.txt are outputs of -h and -x before the patch. >>>> h1.txt and x1.txt are outputs of -h and -x after the patch. >>> >>> Ah, I see now. gcc 3 inserts the wrong linker script. >>> >>> From the specs file you posted earlier: >>> >>> %{!T*:-Tdjgpp-x.djl} %{T*} >>> >>> This means, if no -T option is given, it uses -Tdjgpp-x.djl. Weirdly the >>> -T >>> option is not documented for gcc 3.4.6, that is why I assumed it had to be >>> wrapped via -Wl. >>> >>> New patch attached, this should work then. >> >> Yes, this one does work, and yields an identical dxe. >> >> DJ, Eli: I'd like to apply this patch. Any objections? > > I won't fight its inclusion, but I wonder whether all of the aspects > of this patch have been considered. I'm worried by the changes in > behavior this patch brings. At least the following stand out: > > . the code will no longer heed DXE_LD_LIBRARY_PATH and DJDIR In the vast majority of cases those would point to the global lib directory. That is no longer necessary, gcc will know where to look. In case someone used DXE_LD_LIBRARY_PATH to point to something else, that seems like a strange configuration, was that ever intended to be supported? > . makefile.dxe uses "?=", which AFAICT we never used in the DJGPP > build tree I wasn't aware that this is modern / non-standard (is it though?). But this makefile is only used for quick cross-compiling without configuring/building the whole source tree, so presumably no old versions of GNU Make will ever see it. This change is not directly related to the rest of the patch. But some people (me) who use i386-pc-msdosdjgpp might want some method to configure the cross-prefix. > > Are these changes justified? What if someone wants to use those > environment variables to tweak the build of a DXE? > > Also, this comment no longer describes what the code does, after the > change: > >> /* Allright, now run the assembler on the resulting file */ >> - sprintf(cmdbuf, "%s -o %s %s", dxe_as, TEMP_O_FILE, TEMP_S_FILE); >> + sprintf(cmdbuf, "%s -c -o %s %s", dxe_cc, TEMP_O_FILE, TEMP_S_FILE); It does run the assembler, just indirectly. I also had yet to update the manual for the v2 patch: > DXE_SC: Path to linker script name. If not set, defaults to dxe.ld. > -Passed internally to ld, like 'ld -T dxe.ld' > +Passed internally to the linker, like 'gcc -Wl,-T,dxe.ld' > @end example This line is now somewhat inconsistent with the code. Also, I suppose the version number should be bumped.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |