unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* weird LD definition in src/Makefile
@ 2002-08-19 17:56 Paul Jarc
  2002-08-20 22:13 ` Paul Jarc
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Jarc @ 2002-08-19 17:56 UTC (permalink / raw)


A while ago I posted that the Emacs build system was defining LD=ld in
src/Makefile on my unusually configured GNU/Linux system.  Various
things have changed on my system since then, and now I get
"LD=$(CC) -nostdlib", which still causes problems (Emacs doesn't know
where my libc is, but gcc does). I'm not very familiar with Emacs's
build system, but I think my system ought to use ORDINARY_LINK.
src/s/gnu-linux.h doesn't mention any of ORDINARY_LINK,
COFF_ENCAPSULATE, or LINKER, so how is it decided what to use?  What's
the relationship/difference between Makefile.c and Makefile.in?  I
noticed some mention of LINKER_WAS_SPECIFIED; can I specify a linker
somehow?  But even if I did, I guess STARTFILES might not match if the
guessed linker is wrong.  I have to arrange for the guess to be right.
But what information is the guess based on?


paul

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: weird LD definition in src/Makefile
  2002-08-19 17:56 weird LD definition in src/Makefile Paul Jarc
@ 2002-08-20 22:13 ` Paul Jarc
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Jarc @ 2002-08-20 22:13 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-08-20 22:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-19 17:56 weird LD definition in src/Makefile Paul Jarc
2002-08-20 22:13 ` Paul Jarc

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).