History

-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.

Milutin Jovanović committed 14 years ago

Commit e79c3531 parent 40a54c41 file · +12 −1Browse files

Unified · Split

Makefile+12−1
@@ -13,7 +13,18 @@ LDFLAGS_P=$(LDFLAGS) · 12 unmodified lines
13ifneq ($(GCC_MAJOR),2)13ifneq ($(GCC_MAJOR),2)
14CFLAGS+=-fno-strict-aliasing14CFLAGS+=-fno-strict-aliasing
15ifneq ($(GCC_MAJOR),3)15ifneq ($(GCC_MAJOR),3)
16CFLAGS+=-Wno-pointer-sign -Wno-sign-compare -Wno-unused-result16CFLAGS+=-Wno-pointer-sign -Wno-sign-compare
17
18# add -Wno-unused-result only on gcc >= 4.4
19ifeq ($(GCC_MAJOR),4)
20GCCGREATERTHEN44 := $(shell expr `gcc -dumpversion | cut -f2 -d.` \>= 4)
21else
22GCCGREATERTHEN44 := 1
23endif
24ifeq ($(GCCGREATERTHEN44),1)
25CFLAGS+=-Wno-unused-result
26endif
27
17endif28endif
18endif29endif
19 30

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t