https://gcc.gnu.org/g:20308918164fce2de9c974514d2797cd4652cd12
commit 20308918164fce2de9c974514d2797cd4652cd12 Author: Michael Meissner <meiss...@linux.ibm.com> Date: Tue Jun 18 00:55:58 2024 -0400 Revert changes Diff: --- gcc/config/rs6000/rs6000.cc | 13 +------------ libgcc/config.host | 14 ++++++-------- libgcc/configure | 9 +-------- libgcc/configure.ac | 9 +-------- libgfortran/configure | 7 ++----- libgfortran/configure.ac | 3 --- libgfortran/kinds-override.h | 2 +- 7 files changed, 12 insertions(+), 45 deletions(-) diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index ea36e651b446..c5c4191127e4 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -4146,8 +4146,7 @@ rs6000_option_override_internal (bool global_init_p) the keyword as well as the type. */ TARGET_FLOAT128_TYPE = TARGET_FLOAT128_ENABLE_TYPE && TARGET_VSX; - /* IEEE 128-bit floating point requires VSX support. Disable IEEE 128-bit on - legacy 32-bit LE systems. */ + /* IEEE 128-bit floating point requires VSX support. */ if (TARGET_FLOAT128_KEYWORD) { if (!TARGET_VSX) @@ -4155,16 +4154,6 @@ rs6000_option_override_internal (bool global_init_p) if ((rs6000_isa_flags_explicit & OPTION_MASK_FLOAT128_KEYWORD) != 0) error ("%qs requires VSX support", "-mfloat128"); - TARGET_FLOAT128_TYPE = 0; - rs6000_isa_flags &= ~(OPTION_MASK_FLOAT128_KEYWORD - | OPTION_MASK_FLOAT128_HW); - } - else if (!TARGET_POWERPC64 && !BYTES_BIG_ENDIAN) - { - if ((rs6000_isa_flags_explicit & OPTION_MASK_FLOAT128_KEYWORD) != 0) - error ("%qs requires 64-bit support on little endian systems", - "-mfloat128"); - TARGET_FLOAT128_TYPE = 0; rs6000_isa_flags &= ~(OPTION_MASK_FLOAT128_KEYWORD | OPTION_MASK_FLOAT128_HW); diff --git a/libgcc/config.host b/libgcc/config.host index 9e3b21e98fdd..9fae51d4ce7d 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -1290,18 +1290,16 @@ powerpc*-*-linux*) ;; esac - # If the compiler is not configured for IEEE 128-bit, do not include the - # power9 and power10 hardware support libraries if test $libgcc_cv_powerpc_float128 = yes; then tmake_file="${tmake_file} rs6000/t-float128" + fi - if test $libgcc_cv_powerpc_float128_hw = yes; then - tmake_file="${tmake_file} rs6000/t-float128-hw" + if test $libgcc_cv_powerpc_float128_hw = yes; then + tmake_file="${tmake_file} rs6000/t-float128-hw" + fi - if test $libgcc_cv_powerpc_3_1_float128_hw = yes; then - tmake_file="${tmake_file} rs6000/t-float128-p10-hw" - fi - fi + if test $libgcc_cv_powerpc_3_1_float128_hw = yes; then + tmake_file="${tmake_file} rs6000/t-float128-p10-hw" fi extra_parts="$extra_parts ecrti.o ecrtn.o ncrti.o ncrtn.o" diff --git a/libgcc/configure b/libgcc/configure index f61c9c9b3937..a69d314374a3 100755 --- a/libgcc/configure +++ b/libgcc/configure @@ -5184,16 +5184,9 @@ case ${host} in # check if we have VSX (ISA 2.06) support to build the software libraries, and # whether the assembler can handle xsaddqp for hardware support. Also check if # a new glibc is being used so that __builtin_cpu_supports can be used. -# -# Originally we added -mabi=altivec -mvsx to the tests to see if we could -# support IEEE 128-bit. This would mean that even if the compiler was -# configured for power5, it would build the IEEE 128-bit libraries by adding -# -mvsx. Instead if you want IEEE 128-bit support, you have to configure the -# compiler to build ISA 2.06 (power8) by default. We do add -mfloat128 to -# cater to systems where IEEE 128-bit might not be enabled by default. powerpc*-*-linux*) saved_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -mfloat128" + CFLAGS="$CFLAGS -mabi=altivec -mvsx -mfloat128" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PowerPC ISA 2.06 to build __float128 libraries" >&5 $as_echo_n "checking for PowerPC ISA 2.06 to build __float128 libraries... " >&6; } if ${libgcc_cv_powerpc_float128+:} false; then : diff --git a/libgcc/configure.ac b/libgcc/configure.ac index d9941c0b1a6a..c2749fe09584 100644 --- a/libgcc/configure.ac +++ b/libgcc/configure.ac @@ -407,16 +407,9 @@ case ${host} in # check if we have VSX (ISA 2.06) support to build the software libraries, and # whether the assembler can handle xsaddqp for hardware support. Also check if # a new glibc is being used so that __builtin_cpu_supports can be used. -# -# Originally we added -mabi=altivec -mvsx to the tests to see if we could -# support IEEE 128-bit. This would mean that even if the compiler was -# configured for power5, it would build the IEEE 128-bit libraries by adding -# -mvsx. Instead if you want IEEE 128-bit support, you have to configure the -# compiler to build ISA 2.06 (power8) by default. We do add -mfloat128 to -# cater to systems where IEEE 128-bit might not be enabled by default. powerpc*-*-linux*) saved_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -mfloat128" + CFLAGS="$CFLAGS -mabi=altivec -mvsx -mfloat128" AC_CACHE_CHECK([for PowerPC ISA 2.06 to build __float128 libraries], [libgcc_cv_powerpc_float128], [AC_COMPILE_IFELSE( diff --git a/libgfortran/configure b/libgfortran/configure index 2708e5c7eca4..11a1bc5f0708 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -5981,9 +5981,6 @@ if test "x$GCC" = "xyes"; then #if __SIZEOF_LONG_DOUBLE__ != 16 #error long double is double #endif - #if !defined(__VSX__) - #error VSX is not available - #endif int main () { @@ -12850,7 +12847,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12853 "configure" +#line 12850 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12956,7 +12953,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12959 "configure" +#line 12956 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac index cfaeb9717ab8..cca1ea0ea970 100644 --- a/libgfortran/configure.ac +++ b/libgfortran/configure.ac @@ -148,9 +148,6 @@ if test "x$GCC" = "xyes"; then AC_PREPROC_IFELSE( [AC_LANG_PROGRAM([[#if __SIZEOF_LONG_DOUBLE__ != 16 #error long double is double - #endif - #if !defined(__VSX__) - #error VSX is not available #endif]], [[(void) 0;]])], [AM_FCFLAGS="$AM_FCFLAGS -mabi=ibmlongdouble -mno-gnu-attribute"; diff --git a/libgfortran/kinds-override.h b/libgfortran/kinds-override.h index 51f440e53232..f6b4956c5caa 100644 --- a/libgfortran/kinds-override.h +++ b/libgfortran/kinds-override.h @@ -30,7 +30,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #endif /* Keep these conditions on one line so grep can filter it out. */ -#if defined(__powerpc64__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG_DOUBLE__ == 16 && defined(__VSX__) +#if defined(__powerpc64__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG_DOUBLE__ == 16 typedef _Float128 GFC_REAL_17; typedef _Complex _Float128 GFC_COMPLEX_17; #define HAVE_GFC_REAL_17