This option does not exist in gcc 4.3 and earlier, and it breaks the build on systems with older compilers. The makefile has been enhanced to test for the version and adds it only if a newer compiler is detected.
Unified · Split
| @@ -13,7 +13,18 @@ LDFLAGS_P=$(LDFLAGS) · 12 unmodified lines | ||
| 13 | 13 | ifneq ($(GCC_MAJOR),2) |
| 14 | 14 | CFLAGS+=-fno-strict-aliasing |
| 15 | 15 | ifneq ($(GCC_MAJOR),3) |
| 16 | −CFLAGS+=-Wno-pointer-sign -Wno-sign-compare -Wno-unused-result | |
| 16 | +CFLAGS+=-Wno-pointer-sign -Wno-sign-compare | |
| 17 | + | |
| 18 | +# add -Wno-unused-result only on gcc >= 4.4 | |
| 19 | +ifeq ($(GCC_MAJOR),4) | |
| 20 | +GCCGREATERTHEN44 := $(shell expr `gcc -dumpversion | cut -f2 -d.` \>= 4) | |
| 21 | +else | |
| 22 | +GCCGREATERTHEN44 := 1 | |
| 23 | +endif | |
| 24 | +ifeq ($(GCCGREATERTHEN44),1) | |
| 25 | +CFLAGS+=-Wno-unused-result | |
| 26 | +endif | |
| 27 | + | |
| 17 | 28 | endif |
| 18 | 29 | endif |
| 19 | 30 | |