mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Cc: Samuel Holland <samuel@sholland.org>
Subject: Re: [GCC PATCH] powerpc64 musl libc support for IEEE binary128 long double
Date: Mon, 1 Jul 2019 00:29:04 +0200	[thread overview]
Message-ID: <20190630222904.GD21055@port70.net> (raw)
In-Reply-To: <20190630193825.65174-2-samuel@sholland.org>

* Samuel Holland <samuel@sholland.org> [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.


  reply	other threads:[~2019-06-30 22:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-30 19:38 [PATCH] powerpc64: add IEEE binary128 long double support Samuel Holland
2019-06-30 19:38 ` [GCC PATCH] powerpc64 musl libc support for IEEE binary128 long double Samuel Holland
2019-06-30 22:29   ` Szabolcs Nagy [this message]
2019-07-01  0:59     ` Samuel Holland
2019-07-01  7:17       ` Szabolcs Nagy
2019-07-01 17:42   ` Rich Felker
2019-07-02  0:48     ` Samuel Holland
2019-06-30 22:02 ` [PATCH] powerpc64: add IEEE binary128 long double support Szabolcs Nagy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190630222904.GD21055@port70.net \
    --to=nsz@port70.net \
    --cc=musl@lists.openwall.com \
    --cc=samuel@sholland.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).