This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Makerules: pass CFLAGS when building .S files, BZ #23273
- From: Sergei Trofimovich <slyich at gmail dot com>
- To: libc-alpha at sourceware dot org
- Cc: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, Sergei Trofimovich <slyfox at gentoo dot org>
- Date: Mon, 11 Jun 2018 11:28:15 +0100
- Subject: [PATCH] Makerules: pass CFLAGS when building .S files, BZ #23273
From: Sergei Trofimovich <slyfox@gentoo.org>
When glibc is built on armv7 with CFLAGS="-pipe -march=armv7-a -O2 -mfpu=neon"
rtld fails to link due to missing memcpy symbol.
This happens because .c files are built with -mfpu=neon flag but .S/.s files
are built without it. Among other things -mfpu=neon defines __ARM_NEON__.
To fix this mismatch CFLAGS should be passed consistently to .c and .S files.
Bug: https://sourceware.org/PR23273
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
---
Makerules | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makerules b/Makerules
index b2c2724fcb..ddf72b3723 100644
--- a/Makerules
+++ b/Makerules
@@ -510,10 +510,10 @@ native-compile-mkdep-flags = -MMD -MP -MF $@.dt -MT $@
# GCC can grok options after the file name, and it looks nicer that way.
compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS)
compile.cc = $(CXX) $< -c $(CXXFLAGS) $(CPPFLAGS)
-compile.S = $(CC) $< -c $(CPPFLAGS) $(S-CPPFLAGS) \
+compile.S = $(CC) $< -c $(CFLAGS) $(CPPFLAGS) $(S-CPPFLAGS) \
$(ASFLAGS) $(ASFLAGS-$(suffix $@))
COMPILE.c = $(CC) -c $(CFLAGS) $(CPPFLAGS)
-COMPILE.S = $(CC) -c $(CPPFLAGS) $(S-CPPFLAGS) \
+COMPILE.S = $(CC) -c $(CFLAGS) $(CPPFLAGS) $(S-CPPFLAGS) \
$(ASFLAGS) $(ASFLAGS-$(suffix $@))
# We need this for the output to go in the right place. It will default to
--
2.17.1