public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/maskray/grte] Use clang integrated assembler except when asm is output and not required to be valid
@ 2021-08-27 23:22 Fangrui Song
  0 siblings, 0 replies; only message in thread
From: Fangrui Song @ 2021-08-27 23:22 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=fdb03f97368f55bf3948f5a16f948e079eacca3a

commit fdb03f97368f55bf3948f5a16f948e079eacca3a
Author: Stan Shebs <stanshebs@google.com>
Date:   Fri Aug 27 15:28:23 2021 -0700

    Use clang integrated assembler except when asm is output and not required to be valid

Diff:
---
 Makeconfig | 5 -----
 Makerules  | 5 +++--
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/Makeconfig b/Makeconfig
index 24b8d44959..695c3f81f1 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -907,7 +907,6 @@ ifeq ($(with-clang),yes)
 # Non-string format arguments come from debugging prints in ld.so.
 +cflags += -Wno-format-security
 
-+cflags += -no-integrated-as
 endif	# with-clang == yes
 
 +cflags += $(cflags-cpu) $(+gccwarn) $(+merge-constants) $(+math-flags) \
@@ -1060,10 +1059,6 @@ ASFLAGS := $(filter -g% -fdebug-prefix-map=%,$(CFLAGS))
 endif
 ASFLAGS += -Werror=undef $(ASFLAGS-config) $(asflags-cpu)
 
-ifeq ($(with-clang),yes)
-ASFLAGS += -no-integrated-as
-endif	# with-clang == yes
-
 ifndef BUILD_CC
 BUILD_CC = $(CC)
 endif
diff --git a/Makerules b/Makerules
index 35147191e7..7689488659 100644
--- a/Makerules
+++ b/Makerules
@@ -260,7 +260,7 @@ $(py-const): $(py-const-dir)%.py: %.pysym $(py-const-script) \
 	     $(common-before-compile)
 	$(make-target-directory)
 	$(AWK) -f $(py-const-script) $< \
-	       | $(CC) -S -o $@.tmp $(CFLAGS) $(CPPFLAGS) -x c -
+	       | $(CC) -S $(MOARFLAGS) -o $@.tmp $(CFLAGS) $(CPPFLAGS) -x c -
 	echo '# GENERATED FILE\n' > $@.tmp2
 	echo '# Constant definitions for pretty printers.' >> $@.tmp2
 	echo '# See gen-py-const.awk for details.\n' >> $@.tmp2
@@ -276,10 +276,11 @@ ifdef gen-as-const-headers
 # Generating headers for assembly constants.
 # We need this defined early to get into before-compile before
 # it's used in sysd-rules, below.
+# clang's integrated assembler doesn't like the freaky tokens.
 $(common-objpfx)%.h $(common-objpfx)%.h.d: $(..)scripts/gen-as-const.awk \
 					   %.sym $(common-before-compile)
 	$(AWK) -f $< $(filter %.sym,$^) \
-	| $(CC) -S -o $(@:.h.d=.h)T3 $(CFLAGS) $(CPPFLAGS) -x c - \
+	| $(CC) -S $(MOARFLAGS) -o $(@:.h.d=.h)T3 $(CFLAGS) $(CPPFLAGS) -x c - \
 		-MD -MP -MF $(@:.h=.h.d)T -MT '$(@:.h=.h.d) $(@:.h.d=.h)'
 	sed -n 's/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$$/#define \1 \2/p' \
 		$(@:.h.d=.h)T3 > $(@:.h.d=.h)T


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-27 23:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27 23:22 [glibc/maskray/grte] Use clang integrated assembler except when asm is output and not required to be valid Fangrui Song

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).