all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
Cc: bug-gnu-emacs@gnu.org
Subject: Re: Emacs 21.2 uses ld instead of gcc for linking
Date: Fri, 12 Apr 2002 14:49:51 -0400	[thread overview]
Message-ID: <E16w67L-0003pU-00@fencepost.gnu.org> (raw)
In-Reply-To: <m3g020sylo.fsf@multivac.cwru.edu> (prj@po.cwru.edu)

> From: prj@po.cwru.edu (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,
> COFF_ENCAPSULATE, or LINKER.  Should it?

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

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

    #if __GNUC__ > 1

    #ifdef LINKER
    #define LINKER_WAS_SPECIFIED
    #endif

    /* 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
    #endif

> "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	other threads:[~2002-04-12 18:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-11 18:31 Emacs 21.2 uses ld instead of gcc for linking Paul Jarc
2002-04-12  6:51 ` Eli Zaretskii
2002-04-12 15:52   ` Paul Jarc
2002-04-12 18:49     ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E16w67L-0003pU-00@fencepost.gnu.org \
    --to=eliz@gnu.org \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=eliz@is.elta.co.il \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.