mirror of
https://github.com/frida/tinycc
synced 2024-12-25 22:46:49 +03:00
-Wno-unused-result now added only on gcc >= 4.4
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.
This commit is contained in:
parent
40a54c4399
commit
e79c3533ec
13
Makefile
13
Makefile
@ -13,7 +13,18 @@ LDFLAGS_P=$(LDFLAGS)
|
|||||||
ifneq ($(GCC_MAJOR),2)
|
ifneq ($(GCC_MAJOR),2)
|
||||||
CFLAGS+=-fno-strict-aliasing
|
CFLAGS+=-fno-strict-aliasing
|
||||||
ifneq ($(GCC_MAJOR),3)
|
ifneq ($(GCC_MAJOR),3)
|
||||||
CFLAGS+=-Wno-pointer-sign -Wno-sign-compare -Wno-unused-result
|
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)
|
||||||
|
else
|
||||||
|
GCCGREATERTHEN44 := 1
|
||||||
|
endif
|
||||||
|
ifeq ($(GCCGREATERTHEN44),1)
|
||||||
|
CFLAGS+=-Wno-unused-result
|
||||||
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user