From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2352 Path: news.gmane.org!not-for-mail From: John Spencer Newsgroups: gmane.linux.lib.musl.general Subject: Re: Design idea for subarchs/abivariants Date: Wed, 28 Nov 2012 21:26:43 +0100 Message-ID: <50B67383.6010600@barfooze.de> 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=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1354134403 1075 80.91.229.3 (28 Nov 2012 20:26:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Nov 2012 20:26:43 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2353-gllmg-musl=m.gmane.org@lists.openwall.com Wed Nov 28 21:26:56 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 1TdoDf-0004BS-0Q for gllmg-musl@plane.gmane.org; Wed, 28 Nov 2012 21:26:55 +0100 Original-Received: (qmail 14109 invoked by uid 550); 28 Nov 2012 20:26:42 -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 14101 invoked from network); 28 Nov 2012 20:26:42 -0000 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110221 SUSE/3.1.8 Mail/1.0 In-Reply-To: <20121128192618.GA7491@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:2352 Archived-At: On 11/28/2012 08:26 PM, 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. that sounds good. > 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. as for endian, the current way seems to work well. we can rely on what gcc provides (even if it doesnt supply the endianness directly, it has something like __mipsel__ set, which we currently already use). and apart from endian.h, there doesn't seem to be any need for endian-specific code. > 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. as long as it works automatically (i.e. by querying gcc), cool. but having to pass something like --target=musl-armeabi-v4-el oslt is ugly.