From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.emacs.bugs Subject: Re: weird LD definition in src/Makefile Date: Tue, 20 Aug 2002 18:13:40 -0400 Organization: What did you have in mind? A short, blunt, human pyramid? Sender: bug-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1029881653 32740 127.0.0.1 (20 Aug 2002 22:14:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 20 Aug 2002 22:14:13 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17hHGN-0008Vx-00 for ; Wed, 21 Aug 2002 00:14:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17hHHW-0003hc-00; Tue, 20 Aug 2002 18:15:22 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17hHGf-0003T3-00 for bug-gnu-emacs@prep.ai.mit.edu; Tue, 20 Aug 2002 18:14:29 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17hHGb-0003Rc-00 for bug-gnu-emacs@prep.ai.mit.edu; Tue, 20 Aug 2002 18:14:27 -0400 Original-Received: from sjc3-1.relay.mail.uu.net ([199.171.54.122]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17hHGa-0003Qq-00 for bug-gnu-emacs@prep.ai.mit.edu; Tue, 20 Aug 2002 18:14:25 -0400 Original-Received: from eeyore.INS.cwru.edu by sjc3sosrv11.alter.net with ESMTP (peer crosschecked as: eeyore.INS.CWRU.Edu [129.22.8.17]) id QQncua22013 for ; Tue, 20 Aug 2002 22:14:21 GMT Original-Received: by eeyore.INS.cwru.edu (8.9.3/CWRU-2.8-bsdi) id SAA01066; Tue, 20 Aug 2002 18:14:20 -0400 (EDT) (from news for gnu-emacs-bug@moderators.isc.org) Original-To: gnu-emacs-bug@moderators.isc.org Original-Path: not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 23 Original-NNTP-Posting-Host: multivac.student.cwru.edu Original-X-Trace: eeyore.INS.cwru.edu 1029881658 1051 129.22.96.25 (20 Aug 2002 22:14:18 GMT) Original-X-Complaints-To: abuse@po.cwru.edu Original-NNTP-Posting-Date: 20 Aug 2002 22:14:18 GMT Mail-Copies-To: nobody User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i686-pc-linux-gnu) Cancel-Lock: sha1:6WIrvO2UnqbOF2epZMXPEZW/A+g= Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 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:3255 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:3255 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