[Top][All Lists]

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

Re: Emacs 21.2 uses ld instead of gcc for linking

From: Eli Zaretskii
Subject: Re: Emacs 21.2 uses ld instead of gcc for linking
Date: Fri, 12 Apr 2002 14:49:51 -0400

> From: address@hidden (Paul Jarc)
> Newsgroups: gnu.emacs.bug
> Date: Fri, 12 Apr 2002 11:52:29 -0400
> > This shouldn't happen: in a normal link, src/Makefile.in defines
> > either LD=$(CC) or LD="$(CC) -nostdlib", AFAICS.  This works either
> > automatically or because your src/s/OS.h file defines ORDINARY_LINK.
> src/s/gnu-linux.h does not mention any of ORDINARY_LINK,

No, I don't think so, because of this part:

    /* Fix linking if compiled with GCC.  */
    #ifdef __GNUC__

    #if __GNUC__ > 1

    #ifdef LINKER

    /* Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
       places that are difficult to figure out at make time.  Fortunately,
       these same versions allow you to pass arbitrary flags on to the
       linker, so there's no reason not to use it as a linker.

       Well, it's not quite perfect.  The `-nostdlib' keeps GCC from
       searching for libraries in its internal directories, so we have to
       ask GCC explicitly where to find libgcc.a.  */

    #ifndef LINKER
    #define LINKER $(CC) -nostdlib

> "cpp Makefile.in" produces "LD=ld", though I don't know any way to
> make it show *how* it produced that.  Where should I look next?

I guess you should try to figure out why doesn't the above snippet
work for you.

FWIW, on a Debian GNU/Linux system, I get "LD= ${CC} -nostdlib".

reply via email to

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