bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: weird LD definition in src/Makefile


From: Paul Jarc
Subject: Re: weird LD definition in src/Makefile
Date: Tue, 20 Aug 2002 18:13:40 -0400
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i686-pc-linux-gnu)

Ok, I got it to work with "LD=$(CC) -nostdlib" by editing
src/s/gnu-linux.h to refer to the right paths for crt*.o on my system.
However, I still have the problem I had weeks ago when I was getting
LD=ld - namely, that LDFLAGS is restricted to the intersection of
flags that can be passed to gcc or directly to ld.  But it's for a
different reason this time: sometimes LDFLAGS is passed directly to
gcc, and sometimes it's filtered through prefix-args first (by way of
ALL_LDFLAGS, when building temacs).  If I set LDFLAGS to include, say,
"-rpath /dir", then gcc will complain when it sees that.  If I set it
to include "-Wl,-rpath,/dir", then gcc won't complain, but the
prefix-args case will break, because gcc will see
"-Xlinker -Wl,-rpath,/dir", and do ld will see "-Wl,-rpath,/dir"
instead of "-rpath /dir".

I think prefix-args should be used only for flags specified by the
Makefile itself (and obviously, only when LD=$(CC)..., but that's
handled correctly AFAICT), not those given by the user.  Maybe it
would be easiest to use prefix-args while generating the Makefile,
when only the self-supplied flags are at hand, instead of having the
Makefile rule apply it to possibly the wrong set of flags.


paul




reply via email to

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