build: Actually disable non-useful Clang warnings.
* The if-case was appending to gccBaseFlags after the rest of the file was done using it, so it was ineffective. Now we set it with the rest of the baseFlags. * We already pass no-integrated-as in configure, no need to do it in MainBuildRules. * B_USE_BUILTIN_ATOMIC_FUNCTIONS isn't used anymore, so get rid of it.
This commit is contained in:
@@ -43,6 +43,12 @@ rule ArchitectureSetup architecture
|
|||||||
gccBaseFlags += -fno-builtin-fork -fno-builtin-vfork ;
|
gccBaseFlags += -fno-builtin-fork -fno-builtin-vfork ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# disable some Clang warnings that are not very useful
|
||||||
|
if $(HAIKU_CC_IS_CLANG_$(architecture)) = 1 {
|
||||||
|
gccBaseFlags += -Wno-address-of-packed-member -Wno-unused-private-field
|
||||||
|
-Wno-cast-align -Wno-gnu-designator ;
|
||||||
|
}
|
||||||
|
|
||||||
local cpu = $(HAIKU_CPU_$(architecture)) ;
|
local cpu = $(HAIKU_CPU_$(architecture)) ;
|
||||||
if $(cpu) = arm {
|
if $(cpu) = arm {
|
||||||
if $(HAIKU_CC_IS_CLANG_$(architecture)) != 1 {
|
if $(HAIKU_CC_IS_CLANG_$(architecture)) != 1 {
|
||||||
@@ -106,15 +112,6 @@ rule ArchitectureSetup architecture
|
|||||||
HAIKU_C++FLAGS_$(architecture) += -Wno-deprecated ;
|
HAIKU_C++FLAGS_$(architecture) += -Wno-deprecated ;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch $(cpu) {
|
|
||||||
case x86* :
|
|
||||||
# Enable use of the gcc built-in atomic functions instead of
|
|
||||||
# atomic_*(). The former are inlined and have thus less overhead.
|
|
||||||
# They are not available with gcc 2, but the header will take care
|
|
||||||
# of that.
|
|
||||||
HAIKU_DEFINES_$(architecture) += B_USE_BUILTIN_ATOMIC_FUNCTIONS ;
|
|
||||||
}
|
|
||||||
|
|
||||||
# warning flags
|
# warning flags
|
||||||
HAIKU_WARNING_CCFLAGS_$(architecture)
|
HAIKU_WARNING_CCFLAGS_$(architecture)
|
||||||
= -Wall -Wno-trigraphs -Wmissing-prototypes
|
= -Wall -Wno-trigraphs -Wmissing-prototypes
|
||||||
@@ -134,10 +131,6 @@ rule ArchitectureSetup architecture
|
|||||||
HAIKU_WERROR_FLAGS_$(architecture) += -Wno-unused-but-set-variable ;
|
HAIKU_WERROR_FLAGS_$(architecture) += -Wno-unused-but-set-variable ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if $(HAIKU_CC_IS_CLANG_$(architecture)) = 1 {
|
|
||||||
gccBaseFlags += -Wno-address-of-packed-member -Wno-unused-private-field ;
|
|
||||||
}
|
|
||||||
|
|
||||||
# debug flags
|
# debug flags
|
||||||
local debugFlags = -ggdb ;
|
local debugFlags = -ggdb ;
|
||||||
|
|
||||||
|
|||||||
@@ -353,10 +353,6 @@ rule CreateAsmStructOffsetsHeader header : source
|
|||||||
flags += -Wno-invalid-offsetof ;
|
flags += -Wno-invalid-offsetof ;
|
||||||
# TODO: Rather get rid of the respective offsetof() instances.
|
# TODO: Rather get rid of the respective offsetof() instances.
|
||||||
|
|
||||||
if $(HAIKU_CC_IS_CLANG_$(TARGET_PACKAGING_ARCH)) = 1 {
|
|
||||||
flags += -no-integrated-as ;
|
|
||||||
}
|
|
||||||
|
|
||||||
# locate object, search for source, and set on target variables
|
# locate object, search for source, and set on target variables
|
||||||
|
|
||||||
Depends $(header) : $(source) $(PLATFORM) ;
|
Depends $(header) : $(source) $(PLATFORM) ;
|
||||||
|
|||||||
Reference in New Issue
Block a user