diff options
author | Michael Meissner <meissner@linux.vnet.ibm.com> | 2017-07-12 23:07:50 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 2017-07-12 23:07:50 +0000 |
commit | 3787ee47fc5c67bffa0508e8a9cc70acb8ce4278 (patch) | |
tree | 77cf14d03bfbaab4f105ec33be51a615e6f4b6cc /libgcc/configure.ac | |
parent | 1b68a156d636b8a67e13ac721718c1e1f213f969 (diff) | |
download | gcc-3787ee47fc5c67bffa0508e8a9cc70acb8ce4278.zip gcc-3787ee47fc5c67bffa0508e8a9cc70acb8ce4278.tar.gz gcc-3787ee47fc5c67bffa0508e8a9cc70acb8ce4278.tar.bz2 |
re PR target/81193 (PowerPC GCC __builtin_cpu_is and __builtin_cpu_supports should warn about old libraries)
[gcc]
2017-07-12 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/81193
* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If GLIBC
provides the hardware capability bits, define the macro
__BUILTIN_CPU_SUPPORTS__.
* config/rs6000/rs6000.c (cpu_expand_builtin): Generate a warning
if GLIBC does not provide the hardware capability bits. Add a
gcc_unreachable call if the built-in cpu function is neither
__builtin_cpu_is nor __builtin_cpu_supports.
(rs6000_get_function_versions_dispatcher): Change the warning
that an old GLIBC is used which does not export the capability
bits to be an error.
* doc/extend.texi (target_clones attribute): Document the
restriction that GLIBC 2.23 or newer is needed on the PowerPC.
(PowerPC built-in functions): Document that GLIBC 2.23 or newer is
needed by __builtin_cpu_is and __builtin_cpu_supports. Document
the macros defined by GCC if the newer GLIBC is available.
[gcc/testsuite]
2017-07-12 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/81193
* gcc.target/powerpc/bmi-andn-1.c: Add guard against using
__builtin_cpu_supports with old GLIBC's.
* gcc.target/powerpc/bmi-andn-2.c: Likewise.
* gcc.target/powerpc/bmi-bextr-1.c: Likewise.
* gcc.target/powerpc/bmi-bextr-2.c: Likewise.
* gcc.target/powerpc/bmi-bextr-4.c: Likewise.
* gcc.target/powerpc/bmi-bextr-5.c: Likewise.
* gcc.target/powerpc/bmi-blsi-1.c: Likewise.
* gcc.target/powerpc/bmi-blsi-2.c: Likewise.
* gcc.target/powerpc/bmi-blsmsk-1.c: Likewise.
* gcc.target/powerpc/bmi-blsmsk-2.c: Likewise.
* gcc.target/powerpc/bmi-blsr-1.c: Likewise.
* gcc.target/powerpc/bmi-blsr-2.c: Likewise.
* gcc.target/powerpc/bmi-tzcnt-1.c: Likewise.
* gcc.target/powerpc/bmi-tzcnt-2.c: Likewise.
* gcc.target/powerpc/bmi2-bzhi32-1.c: Likewise.
* gcc.target/powerpc/bmi2-bzhi64-1.c: Likewise.
* gcc.target/powerpc/bmi2-mulx32-1.c: Likewise.
* gcc.target/powerpc/bmi2-mulx32-2.c: Likewise.
* gcc.target/powerpc/bmi2-mulx64-1.c: Likewise.
* gcc.target/powerpc/bmi2-mulx64-2.c: Likewise.
* gcc.target/powerpc/bmi2-pdep32-1.c: Likewise.
* gcc.target/powerpc/bmi2-pdep64-1.c: Likewise.
* gcc.target/powerpc/bmi2-pext32-1.c: Likewise.
* gcc.target/powerpc/bmi2-pext64-1.c: Likewise.
* gcc.target/powerpc/cpu-builtin-1.c: Likewise.
[libgcc]
2017-07-12 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/81193
* configure.ac (PowerPC float128 hardware support): Test whether
we can use __builtin_cpu_supports before enabling the ifunc
handler.
* configure: Regenerate.
From-SVN: r250165
Diffstat (limited to 'libgcc/configure.ac')
-rw-r--r-- | libgcc/configure.ac | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libgcc/configure.ac b/libgcc/configure.ac index 6bcaad6..da49971 100644 --- a/libgcc/configure.ac +++ b/libgcc/configure.ac @@ -376,10 +376,10 @@ esac esac case ${host} in -# At present, we cannot turn -mfloat128 on via #pragma GCC target, -# so just check if we have VSX (ISA 2.06) support to build the -# software libraries, and whether the assembler can handle xsaddqp -# for hardware support. +# At present, we cannot turn -mfloat128 on via #pragma GCC target, so just +# 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. powerpc*-*-linux*) saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mabi=altivec -mvsx -mfloat128" @@ -398,6 +398,9 @@ powerpc*-*-linux*) #ifndef AT_PLATFORM #error "AT_PLATFORM is not defined" #endif + #ifndef __BUILTIN_CPU_SUPPORTS__ + #error "__builtin_cpu_supports is not available" + #endif vector unsigned char add (vector unsigned char a, vector unsigned char b) { vector unsigned char ret; |