From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14317 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: [GCC PATCH] powerpc64 musl libc support for IEEE binary128 long double Date: Mon, 1 Jul 2019 00:29:04 +0200 Message-ID: <20190630222904.GD21055@port70.net> References: <20190630193825.65174-1-samuel@sholland.org> <20190630193825.65174-2-samuel@sholland.org> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="266076"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: Samuel Holland To: musl@lists.openwall.com Original-X-From: musl-return-14333-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jul 01 00:29:19 2019 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.89) (envelope-from ) id 1hhiJz-00172q-63 for gllmg-musl@m.gmane.org; Mon, 01 Jul 2019 00:29:19 +0200 Original-Received: (qmail 23723 invoked by uid 550); 30 Jun 2019 22:29:17 -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 23703 invoked from network); 30 Jun 2019 22:29:16 -0000 Mail-Followup-To: musl@lists.openwall.com, Samuel Holland Content-Disposition: inline In-Reply-To: <20190630193825.65174-2-samuel@sholland.org> Xref: news.gmane.org gmane.linux.lib.musl.general:14317 Archived-At: * Samuel Holland [2019-06-30 14:38:25 -0500]: > gcc/config/rs6000/linux.h | 3 ++- > gcc/config/rs6000/linux64.h | 11 +++++++++-- > 2 files changed, 11 insertions(+), 3 deletions(-) > > diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h > index 96b97877989b..439b5179b172 100644 > --- a/gcc/config/rs6000/linux.h > +++ b/gcc/config/rs6000/linux.h > @@ -139,8 +139,9 @@ > #define POWERPC_LINUX > > /* ppc linux has 128-bit long double support in glibc 2.4 and later. */ > +/* musl supports 128-bit long double in 1.1.23 and later on powerpc64 only. */ > #ifdef TARGET_DEFAULT_LONG_DOUBLE_128 > -#define RS6000_DEFAULT_LONG_DOUBLE_SIZE 128 > +#define RS6000_DEFAULT_LONG_DOUBLE_SIZE (OPTION_MUSL ? 64 : 128) configuring 32bit ppc with 128bit long double is unsupported in musl i think reporting an error in config.gcc is better than trying to fix it up later. OPTION_MUSL can handle -mmusl cflag, not just the configured libc, but i think that's unreliable for other reasons anyway. > --- a/gcc/config/rs6000/linux64.h > +++ b/gcc/config/rs6000/linux64.h > @@ -447,12 +447,18 @@ extern int dot_symbols; > ":%(dynamic_linker_prefix)/lib64/ld64.so.1}" > #endif > > +#ifdef TARGET_DEFAULT_LONG_DOUBLE_128 > +#define MUSL_DYNAMIC_LINKER_FP "%{mlong-double-64:;:-ieee128}" > +#else > +#define MUSL_DYNAMIC_LINKER_FP "%{mlong-double-128:-ieee128}" > +#endif > + > #undef MUSL_DYNAMIC_LINKER32 > #define MUSL_DYNAMIC_LINKER32 \ > "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" > #undef MUSL_DYNAMIC_LINKER64 > #define MUSL_DYNAMIC_LINKER64 \ > - "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" > + "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP ".so.1" why did the -sf disappear? only do this if we are sure we never want to support such abi in musl otherwise keep it with some easy to remember ordering for the extension suffixes (e.g. alphabetical) > /* ppc{32,64} linux has 128-bit long double support in glibc 2.4 and later. */ > +/* musl supports 128-bit long double in 1.1.23 and later on powerpc64 only. */ > #ifdef TARGET_DEFAULT_LONG_DOUBLE_128 > -#define RS6000_DEFAULT_LONG_DOUBLE_SIZE 128 > +#define RS6000_DEFAULT_LONG_DOUBLE_SIZE (OPTION_MUSL && !TARGET_64BIT ? 64 : 128) > #endif same as above, this looks ugly.