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; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=cJ7pD8l2URGU9ksmnr51fbqwIw8DaVF/+IvcjQQlfWI=; b=d8mNKAgLCv5+ /qCwYz1llBtZzuxscqNA6QjcRUi4jjCPCCAjIhFl5dF0ukXiinNfyiEuwaOfOyLyikBPWeXQv+w+P iBWzfK8TaNZcTzh7cpD1PPGsEkzLRPSXtrcnsnIpg3jGrep0WGqBwWMMbHmNemwhNoeBC1ST0k+my BzZcEnX3dE354rk1quNSj/kxHuOpLCYsLHJLbp4Uf0HtiFRn+ElMAYNwvmM5xb80iU7C2fAA0BpKn xcKgqc0xsqlqXk0vPnWwksyxJhvt6kfERLayg3VP+yiyRJGwOFZU3Ie+4BqLW/uWgeEZmYsoFOL2x QaKaPVGWPPlDueRzASdssA==; Date: Fri, 27 Jan 2023 22:10:34 +0200 Message-Id: <83sffvbux1.fsf@gnu.org> From: "Eli Zaretskii (eliz AT gnu DOT org) [via djgpp AT delorie DOT com]" To: djgpp AT delorie DOT com In-Reply-To: (djgpp AT delorie DOT com) Subject: Re: DXE3 with std::vector References: <3b8f674c-bca3-c679-952e-f8ba5af196e7 AT gmail DOT com> <500850be-fd64-3f82-a1e1-929903084e9b AT gmail DOT com> <3d9271ae-266d-ee7b-853b-984857ced1c8 AT gmail DOT com> Reply-To: djgpp AT delorie DOT com > From: "Ozkan Sezer (sezeroz AT gmail DOT com) [via 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] 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 . makefile.dxe uses "?=", which AFAICT we never used in the DJGPP build tree 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);