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:
@@ -142,9 +142,7 @@ if $(HAIKU_GCC_VERSION[1]) >= 3 {
|
|||||||
# too many false positives. Coverity does a better job of this kind of analysis
|
# too many false positives. Coverity does a better job of this kind of analysis
|
||||||
# anyways.
|
# anyways.
|
||||||
if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||||
if $(HAIKU_GCC_VERSION[2]) >= 6 {
|
|
||||||
HAIKU_GCC_BASE_FLAGS += -Wno-array-bounds ;
|
HAIKU_GCC_BASE_FLAGS += -Wno-array-bounds ;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if $(HOST_GCC_VERSION[1]) >= 3 {
|
if $(HOST_GCC_VERSION[1]) >= 3 {
|
||||||
@@ -362,12 +360,10 @@ if $(HAIKU_GCC_VERSION[1]) >= 3 {
|
|||||||
if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||||
HAIKU_C++FLAGS += -Wno-deprecated ;
|
HAIKU_C++FLAGS += -Wno-deprecated ;
|
||||||
|
|
||||||
if $(HAIKU_GCC_VERSION[2]) >= 3 {
|
|
||||||
HAIKU_KERNEL_CCFLAGS += -ffreestanding ;
|
HAIKU_KERNEL_CCFLAGS += -ffreestanding ;
|
||||||
HAIKU_KERNEL_C++FLAGS += -ffreestanding ;
|
HAIKU_KERNEL_C++FLAGS += -ffreestanding ;
|
||||||
HAIKU_BOOT_CCFLAGS += -ffreestanding ;
|
HAIKU_BOOT_CCFLAGS += -ffreestanding ;
|
||||||
HAIKU_BOOT_C++FLAGS += -ffreestanding ;
|
HAIKU_BOOT_C++FLAGS += -ffreestanding ;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HAIKU_KERNEL_PIC_CCFLAGS = -fno-pic ;
|
HAIKU_KERNEL_PIC_CCFLAGS = -fno-pic ;
|
||||||
@@ -1261,10 +1257,8 @@ if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
|||||||
# -Wuninitialized gives too many false positives.
|
# -Wuninitialized gives too many false positives.
|
||||||
HAIKU_WERRORFLAGS = -Wno-error=uninitialized ;
|
HAIKU_WERRORFLAGS = -Wno-error=uninitialized ;
|
||||||
|
|
||||||
if $(HAIKU_GCC_VERSION[2]) >= 6 {
|
|
||||||
# TODO: remove the -Wno-unused-but-set-variable option
|
# TODO: remove the -Wno-unused-but-set-variable option
|
||||||
HAIKU_WERRORFLAGS += -Wno-unused-but-set-variable ;
|
HAIKU_WERRORFLAGS += -Wno-unused-but-set-variable ;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rule EnableWerror dirTokens : scope {
|
rule EnableWerror dirTokens : scope {
|
||||||
|
|||||||
Reference in New Issue
Block a user