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.devel Subject: Re: don't process $(LDFLAGS) with prefix-args Date: Thu, 27 Mar 2003 15:38:29 -0500 Organization: What did you have in mind? A short, blunt, human pyramid? Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1048798151 9012 80.91.224.249 (27 Mar 2003 20:49:11 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 27 Mar 2003 20:49:11 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Mar 27 21:49:10 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18yeJC-0002LB-00 for ; Thu, 27 Mar 2003 21:49:10 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18yeLE-00038b-00 for ; Thu, 27 Mar 2003 21:51:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18yeIO-0002OZ-01 for emacs-devel@quimby.gnus.org; Thu, 27 Mar 2003 15:48:20 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18yeAo-0007sO-00 for emacs-devel@gnu.org; Thu, 27 Mar 2003 15:40:30 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18yeAd-0007lw-00 for emacs-devel@gnu.org; Thu, 27 Mar 2003 15:40:21 -0500 Original-Received: from multivac.student.cwru.edu ([129.22.96.25] helo=multivac.cwru.edu) by monty-python.gnu.org with smtp (Exim 4.10.13) id 18ye9L-00077c-00 for emacs-devel@gnu.org; Thu, 27 Mar 2003 15:38:59 -0500 Original-Received: (qmail 13689 invoked by uid 500); 27 Mar 2003 20:38:52 -0000 Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Thu, 27 Mar 2003 14:04:47 -0500") Mail-Copies-To: nobody Original-Lines: 76 User-Agent: Gnus/5.090017 (Oort Gnus v0.17) Emacs/21.2 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:12673 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12673 Richard Stallman wrote: > Earlier versions of Emacs had a bug where user-supplied $(LDFLAGS) > would be processed by prefix-args when building temacs. The bug was > fixed for 21.2 (or perhaps earlier), but it's back again in 21.3. > > Can you find the difference in 21.3 which brought back the bug? I > don't see any change in Makefile.in between 21.2 and 21.3 that would > relate to this at all. The distributed Makefile.in's are similar enough, but somewhere in the 21.2 build process, Makefile.in is modified like so: --- Makefile.in.2 2003-03-27 14:42:33.000000000 -0500 +++ emacs-21.2/src/Makefile.in 2003-03-27 14:57:21.000000000 -0500 @@ -495,7 +495,7 @@ #endif /* not ORDINARY_LINK */ ALL_LDFLAGS = LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_TEMACS LD_SWITCH_MACHINE \ - LD_SWITCH_MACHINE_TEMACS LD_SWITCH_SITE $(LDFLAGS) + LD_SWITCH_MACHINE_TEMACS LD_SWITCH_SITE /* A macro which other sections of Makefile can redefine to munge the flags before they're passed to LD. This is helpful if you have @@ -868,7 +868,7 @@ #endif temacs: MAKE_PARALLEL $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_MACHINE prefix-args - $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${ALL_LDFLAGS}) \ + $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${ALL_LDFLAGS}) $(LDFLAGS) \ -o temacs ${STARTFILES} ${obj} ${otherobj} \ OBJECTS_MACHINE ${LIBES} 21.3 does not modify its Makefile.in during the build process. > You might want to look at whether LINKER_WAS_SPECIFIED is defined in > 21.2 and in 21.3. A change in that might affect it. Where should I look for that? > User-supplied $(LDFLAGS) is used with both $(CC) and, when building > temacs, $(LD). > > I see it is used with $(CC) when compiling prefix-args. > Anywhere else? I tried building with raw linker flags in LDFLAGS, and I got diagnostics about unrecognized options when building test-distrib, make-docfile, profile, digest-doc, sorted-doc, movemail, cvtmail, fakemail, yow, emacsserver, hexl, etags, ctags, emacsclient, b2m, ebrowse, and prefix-args. > Why do you use -Wl or -Xlinker args in it? I need to supply rpath options so shared libraries will be found. > Precisely which executables do you want those options for? *I* need it for any executables that link to the jpeg, libpng, libungif, ncurses, tiff, xfree86, or zlib libraries. But I imagine other users might want to pass other flags that should take effect for all executables, regardless of what they link to. > This could be fixed by using prefix-args whenever we pass > $(LDFLAGS) to $(CC), but not when we pass $(LDFLAGS) to ld; then the > instructions would have to tell users to pass flags as they should > appear to ld, instead of as they should appear to $(CC). > > As far as I can see, src/Makefile.in already does this, except in on > case: when compiling prefix-args itself. Yes, but the same user-supplied LDFLAGS is used for all subdirectories, so the problem is not limited to src/Makefile.in. paul