From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8886 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: Tue, 17 Nov 2015 18:27:11 -0500 Message-ID: <20151117232711.GG3818@brightrain.aerifal.cx> References: <20151112203048.GB3818@brightrain.aerifal.cx> <20151112211024.GC18372@port70.net> <20151112215232.GC3818@brightrain.aerifal.cx> <20151112234137.GD3818@brightrain.aerifal.cx> <20151117210021.GB3818@brightrain.aerifal.cx> <20151117220141.GD3818@brightrain.aerifal.cx> <20151117230606.GJ18372@port70.net> 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 1447802854 2199 80.91.229.3 (17 Nov 2015 23:27:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Nov 2015 23:27:34 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-8899-gllmg-musl=m.gmane.org@lists.openwall.com Wed Nov 18 00:27:29 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 1Zypeo-0003PR-KN for gllmg-musl@m.gmane.org; Wed, 18 Nov 2015 00:27:26 +0100 Original-Received: (qmail 9584 invoked by uid 550); 17 Nov 2015 23:27:24 -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 9564 invoked from network); 17 Nov 2015 23:27:24 -0000 Content-Disposition: inline In-Reply-To: <20151117230606.GJ18372@port70.net> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:8886 Archived-At: On Wed, Nov 18, 2015 at 12:06:08AM +0100, Szabolcs Nagy wrote: > * Rich Felker [2015-11-17 17:01:41 -0500]: > > However, at this point I'm strongly considering whether we should just > > do away with the subarch dirs entirely and use preprocessed asm or C > > with inline asm in their place. The one place this is mildly difficult > .... > > > > Would this make things simpler for the build system? I think so. > > ok, but that's a separate change then Yes, but rather than introduce a lot of mess and complexity in the build system then go trying to remove it, I'd rather first think through what simple related changes could be made that would eliminate the need to add that mess in the first place. This yields a cleaner, easier-to-understand history and ensures that the prerequisite changes actually happen first so we don't end up stuck with a mess because the changes to make it go away get put off. :) > i think the relevant decision for out-of-tree is > if we want to keep > > %.o: $(ARCH)/%.s > > which means VPATH is needed, or if it's ok to have > ..o files under the $(ARCH) dir, so the rules are just > > %.o: %.s > > %.o: %.sub > > (of course setting $(OBJS) is more tricky then) Assuming .o files in arch dirs are ok, does the following work (non-VPATH)? %.o: $(srcdir)/%.sub ... %.o: $(srcdir)/%.s ... %.o: $(srcdir)/%.c ... (with appropriate commands, of course). If so, I think I like it a lot, because it factors the rules for file *types* separately from the rules for which files to select (the "tricky" $(OBJS) setting). The only big concern is whether this "tricky" setting is too costly in runtime performance or complexity. > i think we can then do out-of-tree independently from > the subarch changes. I don't see a good way to do this without introducing a fairly large amount of mess we plan to immediately remove, unless we just go the VPATH route and leave most of the *.sub stuff alone. Rich