From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: Re: Emacs 21.2 uses ld instead of gcc for linking Date: Fri, 12 Apr 2002 14:49:51 -0400 Sender: bug-gnu-emacs-admin@gnu.org Message-ID: References: <2110-Fri12Apr2002095140+0300-eliz@is.elta.co.il> Reply-To: Eli Zaretskii NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1018637475 27172 127.0.0.1 (12 Apr 2002 18:51:15 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 12 Apr 2002 18:51:15 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16w68g-000749-00 for ; Fri, 12 Apr 2002 20:51:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16w68g-0003vg-00; Fri, 12 Apr 2002 14:51:14 -0400 Original-Received: from eliz by fencepost.gnu.org with local (Exim 3.34 #1 (Debian)) id 16w67L-0003pU-00; Fri, 12 Apr 2002 14:49:51 -0400 Original-To: prj@po.cwru.edu In-Reply-To: (prj@po.cwru.edu) Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:618 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:618 > 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".