aboutsummaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorStan Shebs <stanshebs@google.com>2021-08-27 15:28:23 -0700
committerStan Shebs <stanshebs@google.com>2021-08-27 15:28:23 -0700
commitfdb03f97368f55bf3948f5a16f948e079eacca3a (patch)
tree30b89f7d335701133cd8977bf8f184415d0f198e /Makerules
parent6614ff3213ceaf3ac425e2d34cea5891b3d13c1b (diff)
downloadglibc-fdb03f97368f55bf3948f5a16f948e079eacca3a.zip
glibc-fdb03f97368f55bf3948f5a16f948e079eacca3a.tar.gz
glibc-fdb03f97368f55bf3948f5a16f948e079eacca3a.tar.bz2
Use clang integrated assembler except when asm is output and not required to be valid
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makerules b/Makerules
index 3514719..7689488 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