fix drem symbol for static linking and new targets

Message ID 59D368F7.60909@arm.com
State Committed
Commit f275f64e7e97fcfe31280aabd0d64591c90bbe18
Headers

Commit Message

Szabolcs Nagy Oct. 3, 2017, 10:39 a.m. UTC
  The compat remainder code is no longer built for !LIBM_SVID_COMPAT targets,
but the legacy drem, dremf and dreml symbols should be still defined since
removing them may break existing code, so keep them as aliases in the
non-compat remainder code.

2017-10-03  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	* math/w_remainder.c: New file.
	* math/w_remainderf.c: New file.
	* math/w_remainderl.c: New file.
  

Comments

Joseph Myers Oct. 3, 2017, 1:06 p.m. UTC | #1
On Tue, 3 Oct 2017, Szabolcs Nagy wrote:

> The compat remainder code is no longer built for !LIBM_SVID_COMPAT targets,
> but the legacy drem, dremf and dreml symbols should be still defined since
> removing them may break existing code, so keep them as aliases in the
> non-compat remainder code.
> 
> 2017-10-03  Szabolcs Nagy  <szabolcs.nagy@arm.com>
> 
> 	* math/w_remainder.c: New file.
> 	* math/w_remainderf.c: New file.
> 	* math/w_remainderl.c: New file.

OK, without prejudice to possible reversion of this patch if we obsolete 
the drem symbols before making any releases of new configurations.
  

Patch

diff --git a/math/w_remainder.c b/math/w_remainder.c
new file mode 100644
index 0000000000..86d5da7a2f
--- /dev/null
+++ b/math/w_remainder.c
@@ -0,0 +1,8 @@ 
+#include <math-type-macros-double.h>
+#include <w_remainder_template.c>
+#if __USE_WRAPPER_TEMPLATE
+weak_alias (__remainder, drem)
+# ifdef NO_LONG_DOUBLE
+weak_alias (__remainder, dreml)
+# endif
+#endif
diff --git a/math/w_remainderf.c b/math/w_remainderf.c
new file mode 100644
index 0000000000..f663622268
--- /dev/null
+++ b/math/w_remainderf.c
@@ -0,0 +1,5 @@ 
+#include <math-type-macros-float.h>
+#include <w_remainder_template.c>
+#if __USE_WRAPPER_TEMPLATE
+weak_alias (__remainderf, dremf)
+#endif
diff --git a/math/w_remainderl.c b/math/w_remainderl.c
new file mode 100644
index 0000000000..2aca8bc45a
--- /dev/null
+++ b/math/w_remainderl.c
@@ -0,0 +1,5 @@ 
+#include <math-type-macros-ldouble.h>
+#include <w_remainder_template.c>
+#if __USE_WRAPPER_TEMPLATE
+weak_alias (__remainderl, dreml)
+#endif