aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-12-05 08:39:44 +0800
committerSunil K Pandey <skpgkp2@gmail.com>2024-12-07 13:43:01 -0800
commit5df09b444835fca6e64b3d4b4a5beb19b3b2ba21 (patch)
tree087848737c8b0dfaccc5956f7f8928f0bc105944
parent77c7c4417410f4bf15ea246dd52603dc7be8de45 (diff)
downloadglibc-5df09b444835fca6e64b3d4b4a5beb19b3b2ba21.tar.xz
glibc-5df09b444835fca6e64b3d4b4a5beb19b3b2ba21.zip
math: Exclude internal math symbols for tests [BZ #32414]
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>
-rw-r--r--include/math.h5
-rw-r--r--stdlib/Makefile2
2 files changed, 6 insertions, 1 deletions
diff --git a/include/math.h b/include/math.h
index fa11a710a6..035fd160ff 100644
--- a/include/math.h
+++ b/include/math.h
@@ -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
diff --git a/stdlib/Makefile b/stdlib/Makefile
index c4c2f7fa96..370cfa57aa 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -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)