]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
math: Exclude internal math symbols for tests [BZ #32414]
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 5 Dec 2024 00:39:44 +0000 (08:39 +0800)
committerSunil K Pandey <skpgkp2@gmail.com>
Sat, 7 Dec 2024 21:43:01 +0000 (13:43 -0800)
Since internal tests don't have access to internal symbols in libm,
exclude them for internal tests.  Also make tst-strtod5 and tst-strtod5i
depend on $(libm) to support older versions of GCC which can't inline
copysign family functions.  This fixes BZ #32414.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
include/math.h
stdlib/Makefile

index fa11a710a6c152a4a27e02315ef455bddf8eedc5..035fd160ffb9e032b6b47b79b67e3fa4d8196b18 100644 (file)
@@ -130,7 +130,10 @@ fabsf128 (_Float128 x)
 }
 # endif
 
-# if !(defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0)
+
+/* NB: Internal tests don't have access to internal symbols.  */
+# if !IS_IN (testsuite_internal) \
+     && !(defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0)
 #  ifndef NO_MATH_REDIRECT
 /* Declare some functions for use within GLIBC.  Compilers typically
    inline those functions as a single instruction.  Use an asm to
index c4c2f7fa96d8fbd3671de00f8931c7899d762ad8..370cfa57aa9b124df76d209909f9871978bdbdf4 100644 (file)
@@ -609,6 +609,8 @@ $(objpfx)bug-strtod2: $(libm)
 $(objpfx)tst-strtod-round: $(libm)
 $(objpfx)tst-tininess: $(libm)
 $(objpfx)tst-strtod-underflow: $(libm)
+$(objpfx)tst-strtod5: $(libm)
+$(objpfx)tst-strtod5i: $(libm)
 $(objpfx)tst-strtod6: $(libm)
 $(objpfx)tst-strtod-nan-locale: $(libm)
 $(objpfx)tst-strtod-nan-sign: $(libm)