fix gamma symbol for static linking and new targets
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Mon, 2 Oct 2017 12:01:02 +0000 (13:01 +0100)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Mon, 2 Oct 2017 16:33:13 +0000 (17:33 +0100)
The lgamma compat code is no longer built for !LIBM_SVID_COMPAT targets,
but the legacy gamma, gammaf and gammal symbols should be still defined,
so make them aliases to the non-compat lgamma code.

* math/w_lgamma.c: New file.
* math/w_lgammaf.c: New file.
* math/w_lgammal.c: New file.

ChangeLog
math/w_lgamma.c [new file with mode: 0644]
math/w_lgammaf.c [new file with mode: 0644]
math/w_lgammal.c [new file with mode: 0644]

index a60ba0a..a4eede1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2017-10-02  Szabolcs Nagy  <szabolcs.nagy@arm.com>
 
+       * math/w_lgamma.c: New file.
+       * math/w_lgammaf.c: New file.
+       * math/w_lgammal.c: New file.
+
+2017-10-02  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
        * sysdeps/ieee754/flt-32/e_log2f.c (__log2f): Define without wrapper.
        * sysdeps/ieee754/flt-32/e_logf.c (__logf): Likewise
        * sysdeps/ieee754/flt-32/e_powf.c (__powf): Likewise
diff --git a/math/w_lgamma.c b/math/w_lgamma.c
new file mode 100644 (file)
index 0000000..04b9b19
--- /dev/null
@@ -0,0 +1,10 @@
+#include <math-type-macros-double.h>
+#include <w_lgamma_template.c>
+#if __USE_WRAPPER_TEMPLATE
+strong_alias (__lgamma, __gamma)
+weak_alias (__gamma, gamma)
+# ifdef NO_LONG_DOUBLE
+strong_alias (__gamma, __gammal)
+weak_alias (__gammal, gammal)
+# endif
+#endif
diff --git a/math/w_lgammaf.c b/math/w_lgammaf.c
new file mode 100644 (file)
index 0000000..371fa26
--- /dev/null
@@ -0,0 +1,6 @@
+#include <math-type-macros-float.h>
+#include <w_lgamma_template.c>
+#if __USE_WRAPPER_TEMPLATE
+strong_alias (__lgammaf, __gammaf)
+weak_alias (__gammaf, gammaf)
+#endif
diff --git a/math/w_lgammal.c b/math/w_lgammal.c
new file mode 100644 (file)
index 0000000..cf6cc9c
--- /dev/null
@@ -0,0 +1,6 @@
+#include <math-type-macros-ldouble.h>
+#include <w_lgamma_template.c>
+#if __USE_WRAPPER_TEMPLATE
+strong_alias (__lgammal, __gammal)
+weak_alias (__gammal, gammal)
+#endif