From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11477 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] s390x: Add single instruction math functions Date: Wed, 14 Jun 2017 19:44:26 -0400 Message-ID: <20170614234426.GI1627@brightrain.aerifal.cx> References: <20170610194855.GS1627@brightrain.aerifal.cx> <20170610212801.GW9350@port70.net> <20170611022044.GV1627@brightrain.aerifal.cx> <20170611101955.GX9350@port70.net> <20170612090331.GZ9350@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1497483879 30977 195.159.176.226 (14 Jun 2017 23:44:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 14 Jun 2017 23:44:39 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-11490-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jun 15 01:44:36 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1dLHxj-0007qO-RE for gllmg-musl@m.gmane.org; Thu, 15 Jun 2017 01:44:35 +0200 Original-Received: (qmail 26155 invoked by uid 550); 14 Jun 2017 23:44:39 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 26124 invoked from network); 14 Jun 2017 23:44:38 -0000 Content-Disposition: inline In-Reply-To: Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:11477 Archived-At: On Mon, Jun 12, 2017 at 09:28:52AM -0400, David Edelsohn wrote: > >> The following IBM table of supported and tested systems > >> > >> https://www-03.ibm.com/systems/z/os/linux/resources/testedplatforms.html > >> > >> shows that RHEL 7 and SLES 12 require at least z196, and Ubuntu 16.04 > >> requires at least zEC12. > >> > >> I can't find any official hardware requirements description for Alpine > >> Linux. I tend to doubt that user would run it on older hardware, > >> especially hardware no longer supported by other, modern Linux > >> distributions. > >> > >> Building musl libc on older hardware is a nice accomplishment, but > >> investing effort and complexity to maintain support probably isn't > >> useful to any musl libc user and probably isn't a productive use of > >> developer resources. > >> > >> I will continue to inquire if there is a simple technique to accomplish this. > > Apparently GCC 7.1 added architecture macros. > > As Tuan referenced, Alpine Linux also requires z196 as the minimum > architecture level. I believe that it would be better for s390-musl > to default to z196 ISA than musl to require GCC 7.1. I agree we shouldn't "require GCC 7.1", but using the macros does not imply such a requirement. For example: #if __ARCH__ >= 10 would only use the asm on z196+ (if I got the number right) with GCC 7.1+ (no asm on older compilers), whereas: #if __ARCH__ >= 10 || !defined(__ARCH__) would use the asm on z196+ or on compilers too old to provide __ARCH__ (and building for a more minimal baseline ISA would not be supported on such compilers unless you manually add -D__ARCH__=5 or whatever to CFLAGS). I'm fine with waiting to add those pp conditionals until if/when someone actually wants to use the lower baseline ISA, if you don't want to do it now. I am hesitant to add new ISA-forcing logic to configure, though (see the other reply on that). Would it be bad to have the build fail with low default -march? If so, maybe the configure logic could check for !defined(__ARCH__) and then do a compile test to define __ARCH__ on its own, and we could use the above logic? Rich