# 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
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
-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.
$(common-before-compile)
$(make-target-directory)
$(PYTHON) $(py-const-script) --python \
- --cc="$(CC) $(CFLAGS) $(CPPFLAGS)" $< \
+ --cc="$(CC) $(MOARFLAGS) $(CFLAGS) $(CPPFLAGS)" $< \
> $@.tmp
mv -f $@.tmp $@
# 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