be more cautious on gcc version for warning
This commit is contained in:
@@ -89,19 +89,19 @@ CXX=g++ -std=gnu++11
|
|||||||
GCCGTEQ9 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 9)
|
GCCGTEQ9 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 9)
|
||||||
GCCGTEQ11 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 11)
|
GCCGTEQ11 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 11)
|
||||||
GCCGTEQ12 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 12)
|
GCCGTEQ12 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 12)
|
||||||
GCCGTEQ14 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 14)
|
GCCGTEQ16 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 16)
|
||||||
ifeq "$(GCCGTEQ9)" "1"
|
ifeq "$(GCCGTEQ9)" "1"
|
||||||
# flags present in gcc version greater than or equal to 9 can go here
|
# flags present in gcc version greater than or equal to 9 can go here
|
||||||
CFLAGS+=-Wformat-overflow
|
CFLAGS+=-Wformat-overflow
|
||||||
CFLAGS+=-Wmissing-parameter-type
|
CFLAGS+=-Wmissing-parameter-type
|
||||||
NO_WARN_DISCARDED_QUALIFIERS=-Wno-discarded-qualifiers
|
|
||||||
endif # GCC greater than or equal to 9
|
endif # GCC greater than or equal to 9
|
||||||
#ifeq "$(GCCGTEQ11)" "1"
|
#ifeq "$(GCCGTEQ11)" "1"
|
||||||
CFLAGS+=-Wimplicit-fallthrough
|
CFLAGS+=-Wimplicit-fallthrough
|
||||||
#endif
|
#endif
|
||||||
#ifeq "$(GCCGTEQ12)" "1"
|
#ifeq "$(GCCGTEQ12)" "1"
|
||||||
#endif
|
#endif
|
||||||
#ifeq "$(GCCGTEQ14)" "1"
|
#ifeq "$(GCCGTEQ16)" "1"
|
||||||
|
NO_WARN_DISCARDED_QUALIFIERS=-Wno-discarded-qualifiers
|
||||||
#endif
|
#endif
|
||||||
# end of gcc-specific
|
# end of gcc-specific
|
||||||
else # gcc or clang?
|
else # gcc or clang?
|
||||||
|
|||||||
Reference in New Issue
Block a user