[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: don't process $(LDFLAGS) with prefix-args

From: Paul Jarc
Subject: Re: don't process $(LDFLAGS) with prefix-args
Date: Thu, 27 Mar 2003 15:38:29 -0500
User-agent: Gnus/5.090017 (Oort Gnus v0.17) Emacs/21.2 (gnu/linux)

Richard Stallman <address@hidden> wrote:
>     Earlier versions of Emacs had a bug where user-supplied $(LDFLAGS)
>     would be processed by prefix-args when building temacs.  The bug was
>     fixed for 21.2 (or perhaps earlier), but it's back again in 21.3.
> Can you find the difference in 21.3 which brought back the bug?  I
> don't see any change in Makefile.in between 21.2 and 21.3 that would
> relate to this at all.

The distributed Makefile.in's are similar enough, but somewhere in the
21.2 build process, Makefile.in is modified like so:

--- Makefile.in.2       2003-03-27 14:42:33.000000000 -0500
+++ emacs-21.2/src/Makefile.in  2003-03-27 14:57:21.000000000 -0500
@@ -495,7 +495,7 @@
 #endif /* not ORDINARY_LINK */
 /* A macro which other sections of Makefile can redefine to munge the
    flags before they're passed to LD.  This is helpful if you have
@@ -868,7 +868,7 @@
 temacs: MAKE_PARALLEL $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} 
${otherobj} OBJECTS_MACHINE prefix-args
     -o temacs ${STARTFILES} ${obj} ${otherobj}  \

21.3 does not modify its Makefile.in during the build process.

> You might want to look at whether LINKER_WAS_SPECIFIED is defined in
> 21.2 and in 21.3.  A change in that might affect it.

Where should I look for that?

>     User-supplied $(LDFLAGS) is used with both $(CC) and, when building
>     temacs, $(LD).
> I see it is used with $(CC) when compiling prefix-args.
> Anywhere else?

I tried building with raw linker flags in LDFLAGS, and I got
diagnostics about unrecognized options when building test-distrib,
make-docfile, profile, digest-doc, sorted-doc, movemail, cvtmail,
fakemail, yow, emacsserver, hexl, etags, ctags, emacsclient, b2m,
ebrowse, and prefix-args.

> Why do you use -Wl or -Xlinker args in it?

I need to supply rpath options so shared libraries will be found.

> Precisely which executables do you want those options for?

*I* need it for any executables that link to the jpeg, libpng,
libungif, ncurses, tiff, xfree86, or zlib libraries.  But I imagine
other users might want to pass other flags that should take effect for
all executables, regardless of what they link to.

>     This could be fixed by using prefix-args whenever we pass
>     $(LDFLAGS) to $(CC), but not when we pass $(LDFLAGS) to ld; then the
>     instructions would have to tell users to pass flags as they should
>     appear to ld, instead of as they should appear to $(CC).
> As far as I can see, src/Makefile.in already does this, except in on
> case: when compiling prefix-args itself.

Yes, but the same user-supplied LDFLAGS is used for all
subdirectories, so the problem is not limited to src/Makefile.in.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]