HOSTCC should be used to set HOSTCFLAGS instead of CC.

There is a case where HOSTCC doesn't accept -Wdeclaration-after-statement,
while CC does. It results in a compilation error.
This patch fixes it

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
This commit is contained in:
emellor@leeni.uk.xensource.com committed 2005-12-14 12:22:24 +00:00
1 parent 8b682a9756
commit 3f639e9079
1 file changed
+3 -3
+3 -3
View File
@@ -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))
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.