Honor CC when testing for -Wno-unused-result

The compiler used for compiling tcc is the one referenced in the
CC variable. As such, the check for -Wno-unused-result presence should
be done on CC.
This commit is contained in:
Thomas Preud'homme 2013-01-06 12:20:23 +01:00
parent fc574f1498
commit eb028a8f42

View File

@ -18,7 +18,7 @@ CFLAGS+=-Wno-pointer-sign -Wno-sign-compare
# add -Wno-unused-result only on gcc >= 4.4
ifeq ($(GCC_MAJOR),4)
GCCGREATERTHEN44 := $(shell expr `gcc -dumpversion | cut -f2 -d.` \>= 4)
GCCGREATERTHEN44 := $(shell expr `$(CC) -dumpversion | cut -f2 -d.` \>= 4)
else
GCCGREATERTHEN44 := 1
endif