about summary refs log tree commit diff
path: root/math
diff options
context:
space:
mode:
Diffstat (limited to 'math')
-rw-r--r--math/Versions2
-rw-r--r--math/w_log2f.c7
-rw-r--r--math/w_log2f_compat.c6
-rw-r--r--math/w_logf.c7
-rw-r--r--math/w_logf_compat.c6
-rw-r--r--math/w_powf.c7
-rw-r--r--math/w_powf_compat.c6
7 files changed, 31 insertions, 10 deletions
diff --git a/math/Versions b/math/Versions
index 380f6a2a1a..2fbdb2f266 100644
--- a/math/Versions
+++ b/math/Versions
@@ -230,6 +230,6 @@ libm {
     fromfpx; fromfpxf; fromfpxl; ufromfpx; ufromfpxf; ufromfpxl;
   }
   GLIBC_2.27 {
-    expf; exp2f;
+    expf; exp2f; logf; log2f; powf;
   }
 }
diff --git a/math/w_log2f.c b/math/w_log2f.c
new file mode 100644
index 0000000000..cda0c3a644
--- /dev/null
+++ b/math/w_log2f.c
@@ -0,0 +1,7 @@
+#include <math-type-macros-float.h>
+#undef __USE_WRAPPER_TEMPLATE
+#define __USE_WRAPPER_TEMPLATE 1
+#undef declare_mgen_alias
+#define declare_mgen_alias(a, b)
+#include <w_log2_template.c>
+versioned_symbol (libm, __log2f, log2f, GLIBC_2_27);
diff --git a/math/w_log2f_compat.c b/math/w_log2f_compat.c
index 295c1620f7..3caa310c51 100644
--- a/math/w_log2f_compat.c
+++ b/math/w_log2f_compat.c
@@ -23,10 +23,10 @@
 #include <libm-alias-float.h>
 
 
-#if LIBM_SVID_COMPAT
+#if LIBM_SVID_COMPAT && SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
 /* wrapper log2f(x) */
 float
-__log2f (float x)
+__log2f_compat (float x)
 {
   if (__builtin_expect (islessequal (x, 0.0f), 0) && _LIB_VERSION != _IEEE_)
     {
@@ -44,5 +44,5 @@ __log2f (float x)
 
   return  __ieee754_log2f (x);
 }
-libm_alias_float (__log2, log2)
+compat_symbol (libm, __log2f_compat, log2f, GLIBC_2_1);
 #endif
diff --git a/math/w_logf.c b/math/w_logf.c
new file mode 100644
index 0000000000..d960e016d7
--- /dev/null
+++ b/math/w_logf.c
@@ -0,0 +1,7 @@
+#include <math-type-macros-float.h>
+#undef __USE_WRAPPER_TEMPLATE
+#define __USE_WRAPPER_TEMPLATE 1
+#undef declare_mgen_alias
+#define declare_mgen_alias(a, b)
+#include <w_log_template.c>
+versioned_symbol (libm, __logf, logf, GLIBC_2_27);
diff --git a/math/w_logf_compat.c b/math/w_logf_compat.c
index 7cdacdf921..936b3a6e67 100644
--- a/math/w_logf_compat.c
+++ b/math/w_logf_compat.c
@@ -23,10 +23,10 @@
 #include <libm-alias-float.h>
 
 
-#if LIBM_SVID_COMPAT
+#if LIBM_SVID_COMPAT && SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_27)
 /* wrapper logf(x) */
 float
-__logf (float x)
+__logf_compat (float x)
 {
   if (__builtin_expect (islessequal (x, 0.0f), 0) && _LIB_VERSION != _IEEE_)
     {
@@ -44,5 +44,5 @@ __logf (float x)
 
   return  __ieee754_logf (x);
 }
-libm_alias_float (__log, log)
+compat_symbol (libm, __logf_compat, logf, GLIBC_2_0);
 #endif
diff --git a/math/w_powf.c b/math/w_powf.c
new file mode 100644
index 0000000000..a18348329e
--- /dev/null
+++ b/math/w_powf.c
@@ -0,0 +1,7 @@
+#include <math-type-macros-float.h>
+#undef __USE_WRAPPER_TEMPLATE
+#define __USE_WRAPPER_TEMPLATE 1
+#undef declare_mgen_alias
+#define declare_mgen_alias(a, b)
+#include <w_pow_template.c>
+versioned_symbol (libm, __powf, powf, GLIBC_2_27);
diff --git a/math/w_powf_compat.c b/math/w_powf_compat.c
index 39e818af7e..7745639efe 100644
--- a/math/w_powf_compat.c
+++ b/math/w_powf_compat.c
@@ -22,10 +22,10 @@
 #include <libm-alias-float.h>
 
 
-#if LIBM_SVID_COMPAT
+#if LIBM_SVID_COMPAT && SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_27)
 /* wrapper powf */
 float
-__powf (float x, float y)
+__powf_compat (float x, float y)
 {
   float z = __ieee754_powf (x, y);
   if (__glibc_unlikely (!isfinite (z)))
@@ -60,5 +60,5 @@ __powf (float x, float y)
 
   return z;
 }
-libm_alias_float (__pow, pow)
+compat_symbol (libm, __powf_compat, powf, GLIBC_2_0);
 #endif