Fix incorrect version checks.

It's sufficient to simply check if the gcc version is 4 or higher since
we enforce the use of the latest ported compiler for the build anyways,
and these multi-level checks would fail in their current state if gcc
moved to e.g. version 5.0.
This commit is contained in:
Rene Gollent
2013-03-25 21:14:17 -04:00
parent a54db680ba
commit a198eedcc7
-6
View File
@@ -142,10 +142,8 @@ if $(HAIKU_GCC_VERSION[1]) >= 3 {
# too many false positives. Coverity does a better job of this kind of analysis
# anyways.
if $(HAIKU_GCC_VERSION[1]) >= 4 {
if $(HAIKU_GCC_VERSION[2]) >= 6 {
HAIKU_GCC_BASE_FLAGS += -Wno-array-bounds ;
}
}
if $(HOST_GCC_VERSION[1]) >= 3 {
HOST_GCC_BASE_FLAGS += -fno-strict-aliasing -fno-tree-vrp ;
@@ -362,13 +360,11 @@ if $(HAIKU_GCC_VERSION[1]) >= 3 {
if $(HAIKU_GCC_VERSION[1]) >= 4 {
HAIKU_C++FLAGS += -Wno-deprecated ;
if $(HAIKU_GCC_VERSION[2]) >= 3 {
HAIKU_KERNEL_CCFLAGS += -ffreestanding ;
HAIKU_KERNEL_C++FLAGS += -ffreestanding ;
HAIKU_BOOT_CCFLAGS += -ffreestanding ;
HAIKU_BOOT_C++FLAGS += -ffreestanding ;
}
}
HAIKU_KERNEL_PIC_CCFLAGS = -fno-pic ;
HAIKU_KERNEL_PIC_LINKFLAGS = ;
@@ -1261,11 +1257,9 @@ if $(HAIKU_GCC_VERSION[1]) >= 4 {
# -Wuninitialized gives too many false positives.
HAIKU_WERRORFLAGS = -Wno-error=uninitialized ;
if $(HAIKU_GCC_VERSION[2]) >= 6 {
# TODO: remove the -Wno-unused-but-set-variable option
HAIKU_WERRORFLAGS += -Wno-unused-but-set-variable ;
}
}
rule EnableWerror dirTokens : scope {
AppendToConfigVar CCFLAGS : HAIKU_TOP $(dirTokens)