[powerpc] fenv_libc.h: protect use of __builtin_cpu_supports
authorPaul A. Clarke <pc@us.ibm.com>
Mon, 8 Jul 2019 22:06:19 +0000 (17:06 -0500)
committerPaul A. Clarke <pc@us.ibm.com>
Tue, 9 Jul 2019 18:09:35 +0000 (13:09 -0500)
commitb5232c9f9e6048b8f780d3cbfadbc8e59bb90ce4
tree2a5bc5198738f29083351ee68ad20c274cc75ff1
parent6ba205b2c35e3e024c8c12d2ee1b73363e84da87
[powerpc] fenv_libc.h: protect use of __builtin_cpu_supports

Using __builtin_cpu_supports() requires support in GCC and Glibc.
My recent patch to fenv_libc.h added an unprotected use of
__builtin_cpu_supports().  Compilation of Glibc itself will fail
with a sufficiently new GCC and sufficiently old Glibc:

../sysdeps/powerpc/fpu/fegetexcept.c: In function ‘__fegetexcept’:
../sysdeps/powerpc/fpu/fenv_libc.h:52:20: error: builtin ‘__builtin_cpu_supports’ needs GLIBC (2.23 and newer) that exports hardware capability bits [-Werror]

Reviewed-by: Florian Weimer <fweimer@redhat.com>
Fixes 3db85a9814784a74536a1f0e7b7ddbfef7dc84bb.
ChangeLog
sysdeps/powerpc/fpu/fenv_libc.h