public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Makerules: pass CFLAGS when building .S files, BZ #23273
@ 2018-06-11 10:28 Sergei Trofimovich
  2018-06-11 10:46 ` Florian Weimer
  0 siblings, 1 reply; 14+ messages in thread
From: Sergei Trofimovich @ 2018-06-11 10:28 UTC (permalink / raw)
  To: libc-alpha; +Cc: Adhemerval Zanella, Sergei Trofimovich

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-06-12  7:52 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-11 10:28 [PATCH] Makerules: pass CFLAGS when building .S files, BZ #23273 Sergei Trofimovich
2018-06-11 10:46 ` Florian Weimer
2018-06-11 11:17   ` Adhemerval Zanella
2018-06-11 12:35     ` Sergei Trofimovich
2018-06-11 12:50       ` Florian Weimer
2018-06-11 13:18         ` Sergei Trofimovich
2018-06-11 13:22           ` Florian Weimer
2018-06-11 13:42             ` Sergei Trofimovich
2018-06-11 13:47               ` Florian Weimer
2018-06-11 15:31                 ` Sergei Trofimovich
2018-06-11 21:25                   ` Adhemerval Zanella
2018-06-12  7:52                     ` Sergei Trofimovich
2018-06-11 13:47             ` Adhemerval Zanella
2018-06-11 14:01               ` Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).