From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2350 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Design idea for subarchs/abivariants Date: Wed, 28 Nov 2012 14:26:18 -0500 Message-ID: <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 X-Trace: ger.gmane.org 1354130796 31584 80.91.229.3 (28 Nov 2012 19:26:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Nov 2012 19:26:36 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2351-gllmg-musl=m.gmane.org@lists.openwall.com Wed Nov 28 20:26:48 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 1TdnHP-0000nx-8k for gllmg-musl@plane.gmane.org; Wed, 28 Nov 2012 20:26:43 +0100 Original-Received: (qmail 18249 invoked by uid 550); 28 Nov 2012 19:26:30 -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 18239 invoked from network); 28 Nov 2012 19:26:30 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2350 Archived-At: 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. I think this could be accomplished with a single rule for generating bits/%.h from bits/%.h.sh the way alltypes.h is generated now. The full $(ARCH)$(ENDIAN)$(SUBARCH) could be passed to the script as $1, allowing simple shell logic to choose the right version to output. 3. Having configure derive separate $(ARCH), $(ENDIAN), and $(SUBARCH) from the gcc-style machine strings or combined musl-format arch string. This sounds like it will be minimally invasive and meet the requirements for supporting subarch/abi-variants. Comments? Rich