From eb028a8f423d2623cc174ab4d3c5a80fd8efbdde Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Sun, 6 Jan 2013 12:20:23 +0100 Subject: [PATCH] Honor CC when testing for -Wno-unused-result MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f35bdff..c8bca47 100644 --- a/Makefile +++ b/Makefile @@ -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