[nsz/math, PATCH] e_expf.c: Support multiarch

H.J. Lu hjl.tools@gmail.com
Sat Sep 23 22:22:00 GMT 2017


This is for nsz/math branch.

This is to support compiling e_expf.c more than once for multiarch.

	* sysdeps/ieee754/flt-32/e_expf.c [__expf] (libm_hidden_proto):
	New dummy macro.
	[__expf] (hidden_def, __ieee754_expf, __expf_finite, expf): Skip.
---
 sysdeps/ieee754/flt-32/e_expf.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sysdeps/ieee754/flt-32/e_expf.c b/sysdeps/ieee754/flt-32/e_expf.c
index 8a38c2a0c6..6eecb69822 100644
--- a/sysdeps/ieee754/flt-32/e_expf.c
+++ b/sysdeps/ieee754/flt-32/e_expf.c
@@ -16,6 +16,11 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#ifdef __expf
+# undef libm_hidden_proto
+# define libm_hidden_proto(ignored)
+#endif
+
 #include <math.h>
 #include <stdint.h>
 #include <shlib-compat.h>
@@ -100,7 +105,10 @@ __expf (float x)
   y = y * s;
   return (float) y;
 }
+
+#ifndef __expf
 hidden_def (__expf)
 strong_alias (__expf, __ieee754_expf)
 strong_alias (__expf, __expf_finite)
 versioned_symbol (libm, __expf, expf, GLIBC_2_27);
+#endif
-- 
2.13.5



More information about the Libc-alpha mailing list