aboutsummaryrefslogtreecommitdiffstats
path: root/Config.mk
diff options
context:
space:
mode:
Diffstat (limited to 'Config.mk')
-rw-r--r--Config.mk6
1 files changed, 3 insertions, 3 deletions
diff --git a/Config.mk b/Config.mk
index 4a85a103ed..6f48d6493c 100644
--- a/Config.mk
+++ b/Config.mk
@@ -38,10 +38,10 @@ EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBDIR)
endif
-test-gcc-flag = $(shell $(CC) -v --help 2>&1 | grep -q " $(1) " && echo $(1))
+test-gcc-flag = $(shell $(1) -v --help 2>&1 | grep -q " $(2) " && echo $(2))
-HOSTCFLAGS += $(call test-gcc-flag,-Wdeclaration-after-statement)
-CFLAGS += $(call test-gcc-flag,-Wdeclaration-after-statement)
+HOSTCFLAGS += $(call test-gcc-flag,$(HOSTCC),-Wdeclaration-after-statement)
+CFLAGS += $(call test-gcc-flag,$(CC),-Wdeclaration-after-statement)
LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i))
CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))