]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Use clang integrated assembler except when asm is output and not required to be valid
authorStan Shebs <stanshebs@google.com>
Wed, 7 Feb 2018 21:00:02 +0000 (13:00 -0800)
committerStan Shebs <stanshebs@google.com>
Tue, 30 Apr 2019 21:34:20 +0000 (14:34 -0700)
Makeconfig
Makerules

index ba00331fb80461c4d8911819fa86007cde5ec413..daed1892cb54f9be1b434d4d31e08e593107dee8 100644 (file)
@@ -917,9 +917,6 @@ ifeq ($(with-clang),yes)
 # Non-string format arguments come from debugging prints in ld.so.
 +cflags += -Wno-format-security
 
-# Is this still needed?
-+cflags += -no-integrated-as
-
 ifeq ($(with-lld),yes)
 LDFLAGS.so += -fuse-ld=lld
 LDFLAGS-rtld += -fuse-ld=lld
@@ -1076,10 +1073,6 @@ ASFLAGS := $(filter -g% -fdebug-prefix-map=%,$(CFLAGS))
 endif
 override 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
index e88655c378e48d8181c5037d23064abdb6403ccd..ef529288cdeed2d23f88bb4ce0b98e84d9e75445 100644 (file)
--- a/Makerules
+++ b/Makerules
@@ -225,6 +225,11 @@ sed-remove-dotdot := -e 's@  *\([^         \/$$][^         \]*\)@ $$(..)\1@g' \
                     -e 's@^\([^        \/$$][^         \]*\)@$$(..)\1@g'
 endif
 
+MOARFLAGS =
+ifeq ($(with-clang),yes)
+MOARFLAGS = -no-integrated-as
+endif
+
 ifdef gen-py-const-headers
 # We'll use a static pattern rule to match .pysym files with their
 # corresponding generated .py files.
@@ -249,7 +254,7 @@ $(py-const): $(py-const-dir)%.py: %.pysym $(py-const-script) \
             $(common-before-compile)
        $(make-target-directory)
        $(PYTHON) $(py-const-script) --python \
-                 --cc="$(CC) $(CFLAGS) $(CPPFLAGS)" $< \
+                 --cc="$(CC) $(MOARFLAGS) $(CFLAGS) $(CPPFLAGS)" $< \
                  > $@.tmp
        mv -f $@.tmp $@
 
@@ -268,7 +273,7 @@ ifdef gen-as-const-headers
 # may lead to build hang on a many-core machine.
 $(common-objpfx)%.h $(common-objpfx)%.h.d: $(..)scripts/gen-as-const.py \
                                           %.sym $(common-before-compile)
-       $(PYTHON) $< --cc="$(CC) $(CFLAGS) $(CPPFLAGS) -DGEN_AS_CONST_HEADERS \
+       $(PYTHON) $< --cc="$(CC) $(MOARFLAGS) $(CFLAGS) $(CPPFLAGS) -DGEN_AS_CONST_HEADERS \
                           -MD -MP -MF $(@:.h=.h.d)T \
                           -MT '$(@:.h=.h.d) $(@:.h.d=.h)'" \
                  $(filter %.sym,$^) > $(@:.h.d=.h)T