Mail Archives: djgpp/2023/01/28/02:32:50
> Date: Fri, 27 Jan 2023 21:53:48 +0100
> From: "J.W. Jagersma (jwjagersma AT gmail DOT com) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
>
> > . 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?
I don't know. DJGPP is a very old project, and it is sometimes used
in strange and tricky configurations for perhaps unorthodox purposes.
By removing these variables we could inadvertently break someone's
project in some rare cases. Why do that if we could instead keep the
old behavior intact?
IOW, given the age of DJGPP, we should strive not to make breaking
changes unless we have a very good reason to do so.
> > . 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.
Why is ?= needed here, and a simple = is not enough?
> > 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.
Running "gcc -c -o" is hardly described accurately as "running the
assembler". If we want to go to that level, then the comment should
say something like "run the driver, the compiler, and the assembler"
(not that I think we should say that).
> 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.
Agreed.
Thanks.
- Raw text -