about summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc64/le/configure
diff options
context:
space:
mode:
authorPaul E. Murphy <murphyp@linux.vnet.ibm.com>2020-03-17 08:38:54 -0500
committerPaul E. Murphy <murphyp@linux.vnet.ibm.com>2020-04-30 08:52:08 -0500
commit5c7ccc29830fb59d39d67222caca5b4bd6ca2e0f (patch)
tree9079b343178de921de8bfedabd45670c0ade54b5 /sysdeps/powerpc/powerpc64/le/configure
parent3a0acbdcc51a6a854be6500da325b99cc68754c3 (diff)
downloadglibc-5c7ccc29830fb59d39d67222caca5b4bd6ca2e0f.tar.gz
glibc-5c7ccc29830fb59d39d67222caca5b4bd6ca2e0f.tar.xz
glibc-5c7ccc29830fb59d39d67222caca5b4bd6ca2e0f.zip
powerpc64le: blacklist broken GCC compilers (e.g GCC 7.5.0)
GCC 7.5.0 (PR94200) will refuse to compile if both -mabi=% and
-mlong-double-128 are passed on the command line.  Surprisingly,
it will work happily if the latter is not.  For the sake of
maintaining status quo, test for and blacklist such compilers.

Tested with a GCC 8.3.1 and GCC 7.5.0 compiler for ppc64le.

Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Diffstat (limited to 'sysdeps/powerpc/powerpc64/le/configure')
-rw-r--r--sysdeps/powerpc/powerpc64/le/configure27
1 files changed, 27 insertions, 0 deletions
diff --git a/sysdeps/powerpc/powerpc64/le/configure b/sysdeps/powerpc/powerpc64/le/configure
index bd7b8e77d0..98a4889945 100644
--- a/sysdeps/powerpc/powerpc64/le/configure
+++ b/sysdeps/powerpc/powerpc64/le/configure
@@ -90,6 +90,33 @@ if test "$libc_cv_compiler_powerpc64le_ice" != "yes"; then :
   critic_missing="$critic_missing __builtin_signbit is broken.  GCC 7.4 or newer is required to resolve (PR83862)."
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC compiles with -mabi=ieeelongdouble and -mlong-double-128" >&5
+$as_echo_n "checking if $CC compiles with -mabi=ieeelongdouble and -mlong-double-128... " >&6; }
+if ${libc_cv_compiler_powerpc64le_ldbl128_mabi+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -mabi=ieeelongdouble -mlong-double-128"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+long double x;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  libc_cv_compiler_powerpc64le_ldbl128_mabi=yes
+else
+  libc_cv_compiler_powerpc64le_ldbl128_mabi=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+CFLAGS="$save_CFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_compiler_powerpc64le_ldbl128_mabi" >&5
+$as_echo "$libc_cv_compiler_powerpc64le_ldbl128_mabi" >&6; }
+if test "$libc_cv_compiler_powerpc64le_ldbl128_mabi" == "no"; then :
+  critic_missing="$critic_missing The compiler must support -mabi=ieeelongdouble and -mlongdouble simultaneously."
+fi
+
 for ac_prog in $OBJCOPY
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.