[PATCH 1/5] Make all of sysdeps/ia64/fpu/libm-symbols.h only visible to libc||libm; move #defines from makefile there.
Zack Weinberg
zackw@panix.com
Mon Nov 28 16:00:00 GMT 2016
Found during many-glibcs testing. sysdeps/ia64/fpu/libm-symbols.h and
sysdeps/ia64/fpu/Makefile define a bunch of macros that are only
*relevant* to core math library code, but they leak into everything
compiled by the top-level math directory, breaking certain tests. I
propose to fix this by moving the -D switches from the Makefile into
libm-symbols.h, and then making the entirety of that file conditional
on IS_IN(libc) || IS_IN(libm).
Joseph has also submitted a patch for the same problem,
<https://sourceware.org/ml/libc-alpha/2016-11/msg00313.html>, and I
don't care which one gets applied, just as long as the problem does
get fixed soon.
zw
---
sysdeps/ia64/fpu/Makefile | 6 +-----
sysdeps/ia64/fpu/libm-symbols.h | 15 +++++++++++++++
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/sysdeps/ia64/fpu/Makefile b/sysdeps/ia64/fpu/Makefile
index 384fc83..450d712 100644
--- a/sysdeps/ia64/fpu/Makefile
+++ b/sysdeps/ia64/fpu/Makefile
@@ -26,9 +26,5 @@ libm-sysdep_routines += s_erfc s_erfcf s_erfcl \
sysdep_routines += libc_libm_error libm_frexp libm_frexpf libm_frexpl \
$(duplicated-routines)
-sysdep-CPPFLAGS += -include libm-symbols.h \
- -D__POSIX__ -Dopensource \
- -D_LIB_VERSIONIMF=_LIB_VERSION \
- -DSIZE_INT_32 -DSIZE_LONG_INT_64 -DSIZE_LONG_LONG_INT_64 \
- -DSIZE_LONG_64 -DIA64
+sysdep-CPPFLAGS += -include libm-symbols.h
endif
diff --git a/sysdeps/ia64/fpu/libm-symbols.h b/sysdeps/ia64/fpu/libm-symbols.h
index 3cbc6c4..62c9adb 100644
--- a/sysdeps/ia64/fpu/libm-symbols.h
+++ b/sysdeps/ia64/fpu/libm-symbols.h
@@ -1,3 +1,16 @@
+#if IS_IN (libc) || IS_IN (libm)
+
+/* The externally maintained code in this directory expects these
+ macros to be defined. */
+#define __POSIX__ 1
+#define opensource 1
+#define _LIB_VERSIONIMF _LIB_VERSION
+#define SIZE_INT_32 1
+#define SIZE_LONG_INT_64 1
+#define SIZE_LONG_LONG_INT_64 1
+#define SIZE_LONG_64 1
+#define IA64 1
+
#include <sysdep.h>
#undef ret /* get rid of the stupid "ret" macro; it breaks br.ret */
@@ -56,3 +69,5 @@
#if defined ASSEMBLER && IS_IN (libc)
# define __libm_error_support HIDDEN_JUMPTARGET(__libm_error_support)
#endif
+
+#endif
--
2.10.2
More information about the Libc-alpha
mailing list