glibc/sysdeps/powerpc
Gabriel F. T. Gomes e010deb231 powerpc: Add redirection for finitef128, isinf128, and isnanf128
On powerpc64le, compiler support for float128 is not enabled by default
on gcc.  To enable it, the flag -mfloat128 must be passed as a command
line option to the compiler.  This means that only the few files that
actively have -mfloat128 passed as an argument get compiler support for
float128, whereas all other files don't.

When -mfloat128 becomes enabled by default on powerpc [1], all the files
that do not currently have compiler support for float128 enabled during
their compilation, will start to have it.  This will lead to build
errors in s_finite.c, s_isinf.c, and s_isnan.c.

The errors are due to the unintended macro expansion of __finitef128 to
__redirect_finitef128 in math/bits/mathcalls-helper-functions.h.  In
that header, __MATHDECL_1 takes '__finite' and 'f128' as arguments and
concatenates them.  However, since '__finite' has been redefined in
s_finite.c, the function declaration becomes __redirect_finitef128:

    extern int __redirect___finitef128 (_Float128 __value) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));

This declaration itself is OK.  The problem arises when include/math.h
creates the hidden prototype ('hidden_proto (__finitef128)'), which
expands to:

    extern __typeof (__finitef128) __finitef128 __attribute__ ((visibility ("hidden")));

Since __finitef128 is not declared, __typeof fails.  This effect was
already true for the 'float' and 'long double' versions and is now true
for float128.  Likewise for isinsff128 and isnanf128.

This patch defines __finitef128 as __redirect___finitef128 in
sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c, similarly to what's
done for the float and long double versions of these functions, to get
rid of the build error.  Likewise for isinff128 and isnanf128.

[1] https://gcc.gnu.org/ml/gcc-patches/2017-08/msg01028.html

Tested for powerpc64 and powerpc64le.

	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c
	(__finitef128): Define to __redirect___finitef128.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c
	(__isinff128): Define to __redirect___isinff128.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c
	(__isnanf128): Define to __redirect___isnanf128.
2017-09-21 17:37:39 -03:00
..
bits float128: Add signbit alternative for old compilers 2017-06-30 18:34:29 -03:00
fpu Obsolete pow10 functions. 2017-09-01 21:13:18 +00:00
nofpu Obsolete pow10 functions. 2017-09-01 21:13:18 +00:00
nptl Move shared pthread definitions to common headers 2017-05-09 17:49:17 -03:00
power4 Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
power5+/fpu Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
power6 Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
power7/fpu powerpc: Fix logbl on power7 [BZ# 21280] 2017-04-28 19:45:52 -03:00
powerpc32 Remove powerpc32 sqrt wrappers. 2017-08-25 11:33:04 +00:00
powerpc64 powerpc: Add redirection for finitef128, isinf128, and isnanf128 2017-09-21 17:37:39 -03:00
powerpc64le powerpc64le: Add -mfloat128 to tst-strtod-nan-locale testcase 2017-09-21 17:37:39 -03:00
soft-fp soft-fp: support after-rounding tininess detection. 2014-02-12 18:27:12 +00:00
sys/platform Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
abort-instr.h Update. 2002-09-15 18:31:23 +00:00
atomic-machine.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dl-procinfo.c powerpc: Update AT_HWCAP[2] bits 2017-06-23 09:10:32 -03:00
dl-procinfo.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dl-tls.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dl-tls.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ffs.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fpu_control.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
gccframe.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
hwcapinfo.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
hwcapinfo.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ifunc-sel.h Do not stack-protect ifunc resolvers [BZ #7065] 2016-12-26 10:08:41 +01:00
Implies PowerPC: unify math_ldbl.h implementations 2013-03-08 11:07:15 -03:00
jmpbuf-offsets.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ldsodefs.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
libc-tls.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
locale-defines.sym powerpc: strcasestr optmization for power8 2016-04-22 19:23:13 +05:30
longjmp.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
machine-gmon.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Makefile tst-tlsopt-powerpc as a shared lib 2017-08-03 15:39:21 +09:30
math-tests.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memusage.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mod-tlsopt-powerpc.c tst-tlsopt-powerpc as a shared lib 2017-08-03 15:39:21 +09:30
mp_clz_tab.c Update. 2002-03-14 20:48:50 +00:00
novmx-longjmp.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
novmx-sigjmp.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
novmxsetjmp.h Remove __need macros from signal.h. 2017-05-20 19:04:43 -04:00
preconfigure powerpc64le: Create divergent sysdep directory for powerpc64le. 2017-04-28 14:17:57 -03:00
rtld-global-offsets.sym PowerPC: Define AT_HWCAP2 bits and AT_HWCAP2 handling for POWER8. 2013-06-28 16:52:49 -05:00
sched_cpucount.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sigjmp.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sotruss-lib.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
stackinfo.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sysdep.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
test-arith.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
test-arithf.c Update. 1997-08-10 18:37:15 +00:00
test-get_hwcap-static.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
test-get_hwcap.c powerpc: Convert tests to the new support test-driver 2017-02-21 14:00:00 -03:00
test-gettimebase.c powerpc: Convert tests to the new support test-driver 2017-02-21 14:00:00 -03:00
tls-macros.h Split tls-macros.h in sysdeps directories. 2012-07-19 17:04:04 -03:00
tst-set_ppr.c Miscellaneous low-risk changes preparing for _ISOMAC testsuite. 2017-03-01 20:32:50 -05:00
tst-stack-align.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-tlsifunc-static.c powerpc: Fix float128 IFUNC relocations [BZ #21707] 2017-07-17 17:49:26 -03:00
tst-tlsifunc.c powerpc: Fix float128 IFUNC relocations [BZ #21707] 2017-07-17 17:49:26 -03:00
tst-tlsopt-powerpc.c tst-tlsopt-powerpc as a shared lib 2017-08-03 15:39:21 +09:30
Versions Add femode_t functions. 2016-09-07 16:40:09 +00:00