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.
Unified · Split
| @@ -18,7 +18,7 @@ CFLAGS+=-Wno-pointer-sign -Wno-sign-compare · 17 unmodified lines | |||
| 18 | 18 | ||
| 19 | # add -Wno-unused-result only on gcc >= 4.4 | 19 | # add -Wno-unused-result only on gcc >= 4.4 |
| 20 | ifeq ($(GCC_MAJOR),4) | 20 | ifeq ($(GCC_MAJOR),4) |
| 21 | GCCGREATERTHEN44 := $(shell expr `gcc -dumpversion | cut -f2 -d.` \>= 4) | 21 | GCCGREATERTHEN44 := $(shell expr `$(CC) -dumpversion | cut -f2 -d.` \>= 4) |
| 22 | else | 22 | else |
| 23 | GCCGREATERTHEN44 := 1 | 23 | GCCGREATERTHEN44 := 1 |
| 24 | endif | 24 | endif |