On 15/11/2019 17:48, Segher Boessenkool wrote: > On Fri, Nov 15, 2019 at 05:26:41PM +0000, Szabolcs Nagy wrote: >> On powerpc and s390x the musl ABI requires 64 bit and 128 bit long >> double respectively, so adjust the default. >> >> gcc/ChangeLog: >> >> 2019-11-15 Szabolcs Nagy <szabolcs.n...@arm.com> >> >> * configure.ac: Set gcc_cv_target_ldbl128 for musl targets. >> * configure: Regenerate. > > Please correct the changelog, then? > >> diff --git a/gcc/configure.ac b/gcc/configure.ac >> index 1a0d68208e4..330d5fcaf68 100644 >> --- a/gcc/configure.ac >> +++ b/gcc/configure.ac >> @@ -6161,13 +6161,25 @@ case "$target" in >> AC_ARG_WITH(long-double-128, >> [AS_HELP_STRING([--with-long-double-128], >> [use 128-bit long double by default])], >> - gcc_cv_target_ldbl128="$with_long_double_128", >> + gcc_cv_target_ldbl128="$with_long_double_128", [ >> + case "$target" in >> + s390*-*-linux-musl*) >> + gcc_cv_target_ldbl128=yes >> + ;; >> + powerpc*-*-linux-musl*) >> + gcc_cv_target_ldbl128=no >> + ;; >> + *)] > > I think it would be much more readable and maintainable if you did > something like > > case "$target" in > powerpc*-*-linux-musl) > gcc_cv_target_ldbl128=no > ;; > s390*-*-linux-musl) > gcc_cv_target_ldbl128=yes > ;; > powerpc*-*-linux* | > sparc*-*-linux* | > s390*-*-linux* | > alpha*-*-linux*) > AC_ARG_WITH(long-double-128, > > etc., i.e. add the musl targets to the main switch here?
i'm fine with that, it means the --with-long-double-128 switch does not work on *-musl, which is not a huge loss as the musl abi won't change, but i thought one should be able to configure a non-default-abi toolchain if it's a documented configure option for the target. i'll try your simplified solution.