From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8944 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Support for out-of-tree build Date: Sun, 29 Nov 2015 20:35:55 -0500 Message-ID: <20151130013555.GT3818@brightrain.aerifal.cx> References: <20151117230606.GJ18372@port70.net> <20151117232711.GG3818@brightrain.aerifal.cx> <20151117234330.GH3818@brightrain.aerifal.cx> <20151118001955.GI3818@brightrain.aerifal.cx> <20151118214452.GQ3818@brightrain.aerifal.cx> <20151120222000.GA3818@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1448847372 1851 80.91.229.3 (30 Nov 2015 01:36:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Nov 2015 01:36:12 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-8957-gllmg-musl=m.gmane.org@lists.openwall.com Mon Nov 30 02:36:07 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1a3DNu-0007FR-He for gllmg-musl@m.gmane.org; Mon, 30 Nov 2015 02:36:06 +0100 Original-Received: (qmail 24172 invoked by uid 550); 30 Nov 2015 01:36:09 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 24154 invoked from network); 30 Nov 2015 01:36:08 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:8944 Archived-At: On Mon, Nov 30, 2015 at 01:29:06AM +0000, Petr Hosek wrote: > On Fri, Nov 20, 2015 at 2:21 PM Rich Felker wrote: > > > I think this is failing to replicate the current behavior where a .sub > > file in src/*/$(ARCH)$(ASMSUBARCH) replaces the .s file in > > src/*/$(ARCH). In cases where both exist we'll end up with duplicate > > symbol errors linking libc.so and both present (with the wrong one > > likely getting used) in libc.a. > > > > I tried various combinations of ARCH and SUBARCH and the behavior seems to > be the same as in current implementation. Do you have any examples? With ARCH=sh and SUBARCH=-nofpu and ASMSUBARCH=-nofpu, it looks to me like both src/setjmp/sh/setjmp.o and src/setjmp/sh-nofpu/setjmp.s will get included, rather than the latter replacing the former. > > This problem will of course disappear when we get rid of .sub files, > > but that doesn't help unless we remove .sub files first. > > > > I suppose all that's needed for now is to add more EXCLUDE_OBJS using > > the same input but with: > > > > $(subst /$(ARCH)$(ASMSUBARCH)/,/$(ARCH)/,... > > > > instead of: > > > > $(subst /$(ARCH)$(ASMSUBARCH)/,/,... > > > > Does this sound right? > > > > When I tried this change, I started getting duplicate symbol errors when > linking libc.so, but with the original it seems to be working fine (this > particular case was when ARCH=arm SUBARCH=hf ASMSUBARCH=ebhf). I didn't mean to get rid of the existing subst, but to introduce a second one, so that src/whatever/$(ARCH)@(ASMSUBARCH)/foo.o excludes/replaces both src/whatever/$(ARCH)/foo.o and src/whatever/foo.o. Rich