From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2351 Path: news.gmane.org!not-for-mail From: Isaac Dunham Newsgroups: gmane.linux.lib.musl.general Subject: Re: Design idea for subarchs/abivariants Date: Wed, 28 Nov 2012 12:03:41 -0800 Message-ID: <20121128120341.ca114e90.idunham@lavabit.com> References: <20121128192618.GA7491@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 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1354133046 20405 80.91.229.3 (28 Nov 2012 20:04:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Nov 2012 20:04:06 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2352-gllmg-musl=m.gmane.org@lists.openwall.com Wed Nov 28 21:04:17 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Tdnrh-00040b-Bw for gllmg-musl@plane.gmane.org; Wed, 28 Nov 2012 21:04:13 +0100 Original-Received: (qmail 4015 invoked by uid 550); 28 Nov 2012 20:04:02 -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 4007 invoked from network); 28 Nov 2012 20:04:01 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=2UwsJ4VP/+ZvaBxAzId5cxFLTupWav02dxQ0rhZLqvmUc5KQG4UZVfvJIb5LKdKzH7Csizh+cRgjqyf3znPWav0h22nk9hGvIPZEuQ0LiAPp7sGmqQtbH+GQBqB/QeLVo5lawLxUkNoK9KGRua+eClRKOn1+TsIycb12jA85DP0=; h=Date:From:To:Subject:Message-Id:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; In-Reply-To: <20121128192618.GA7491@brightrain.aerifal.cx> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; i486-pc-linux-gnu) Xref: news.gmane.org gmane.linux.lib.musl.general:2351 Archived-At: On Wed, 28 Nov 2012 14:26:18 -0500 Rich Felker wrote: > The problem: how to have subarch variants on the bits headers and asm > for a given arch without ugly build system complications or massive > duplication of files. > > Proposed solution: > > 1. $(ARCH)$(SUBARCH)/%.s is searched in addition to $(ARCH)/%.s for > arch-specific files replacing general %.c files in the src tree. This > would allow src/fenv/arm-hf/%.s and src/setjmp/mips-sf/%.s files, for > example. > 2. Making bits/endian.h, bits/fenv.h, and any other bits headers that > need to vary per-subarch into generated headers. > 3. Having configure derive separate $(ARCH), $(ENDIAN), and $(SUBARCH) > from the gcc-style machine strings or combined musl-format arch string. > Comments? Seems fairly clean to me, though I'd been thinking of a variant of 1: $(ARCH)/$(SUBARCH)/%.s (on the premise that anything that gets used for an arch should be in one place). But now that I think about it, I'm not certain that's a meaningful advantage, and with your approach, */.s is going to get every appropriate file. By the way, while we're on the makefile: in the past, I've run into issues with cycles like: make git pull # or git checkout .... make clean # doesn't handle files that were moved/deleted make # link breaks, due to remaining oject files I usually do this to cleanup in such cases: find src arch -name '*.*o' |xargs rm Would adding some similar logic be sensible (at least for the distclean target)? -- Isaac Dunham