Added workarounds and options for gcc 4.6.2
* add -Wno-unused-but-set-variable for gcc 4.6.x with a TODO * fix warnings about wrong size of pointer cast in ioapic.cpp and AudioBuffer.cpp
This commit is contained in:
+14
-14
@@ -1185,24 +1185,24 @@ AUTO_SET_UP_CONFIG_VARIABLES +=
|
||||
|
||||
|
||||
# enable -Werror for certain parts of the source tree
|
||||
|
||||
if $(HAIKU_GCC_VERSION[1]) = 2 {
|
||||
rule EnableWerror dirTokens : scope {
|
||||
AppendToConfigVar CCFLAGS : HAIKU_TOP $(dirTokens) : -Werror
|
||||
: $(scope) ;
|
||||
AppendToConfigVar C++FLAGS : HAIKU_TOP $(dirTokens) : -Werror
|
||||
: $(scope) ;
|
||||
}
|
||||
} else {
|
||||
HAIKU_WERRORFLAGS = ;
|
||||
if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
# -Wuninitialized gives too many false positives.
|
||||
rule EnableWerror dirTokens : scope {
|
||||
AppendToConfigVar CCFLAGS : HAIKU_TOP $(dirTokens)
|
||||
: -Werror -Wno-error=uninitialized : $(scope) ;
|
||||
AppendToConfigVar C++FLAGS : HAIKU_TOP $(dirTokens)
|
||||
: -Werror -Wno-error=uninitialized : $(scope) ;
|
||||
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)
|
||||
: -Werror $(HAIKU_WERRORFLAGS) : $(scope) ;
|
||||
AppendToConfigVar C++FLAGS : HAIKU_TOP $(dirTokens)
|
||||
: -Werror $(HAIKU_WERRORFLAGS) : $(scope) ;
|
||||
}
|
||||
|
||||
# Work-around for GCC 2 problem -- despite -Wno-multichar it reports
|
||||
# multichar warnings in headers/private/kernel/debugger_keymaps.h included by
|
||||
# src/system/kernel/arch/x86/arch_debug_console.cpp.
|
||||
|
||||
@@ -144,7 +144,7 @@ copy_headers $haikuSourceDir/headers/posix $tmpIncludeDir/posix
|
||||
cd $gccObjDir
|
||||
CFLAGS="-O2" CXXFLAGS="-O2" $gccSourceDir/configure --prefix=$installDir \
|
||||
--target=$haikuMachine --disable-nls --disable-shared \
|
||||
--enable-languages=c,c++ \
|
||||
--enable-languages=c,c++ --enable-lto --enable-frame-pointer \
|
||||
--with-headers=$tmpIncludeDir --with-libs=$tmpLibDir \
|
||||
$gccConfigureArgs || exit 1
|
||||
|
||||
|
||||
@@ -223,8 +223,8 @@ uint32 AudioBuffer::copyTo(
|
||||
// convert and copy a sample at a time
|
||||
for(; remaining; remaining -= sampleSize) {
|
||||
convert_sample(
|
||||
(void*) *((int8*)m_pData + fromOffset),
|
||||
(void*) *((int8*)target.m_pData + targetOffset),
|
||||
(void*) ((int8*)m_pData + fromOffset),
|
||||
(void*) ((int8*)target.m_pData + targetOffset),
|
||||
m_format.format,
|
||||
target.m_format.format);
|
||||
|
||||
|
||||
@@ -529,8 +529,8 @@ acpi_configure_source_overrides(acpi_table_madt* madt)
|
||||
if (info->SourceIrq != info->GlobalIrq) {
|
||||
// we need a vector mapping
|
||||
install_io_interrupt_handler(info->GlobalIrq,
|
||||
&ioapic_source_override_handler, (void*)info->SourceIrq,
|
||||
B_NO_ENABLE_COUNTER);
|
||||
&ioapic_source_override_handler,
|
||||
(void*)(addr_t)info->SourceIrq, B_NO_ENABLE_COUNTER);
|
||||
|
||||
sSourceOverrides[info->SourceIrq] = info->GlobalIrq;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user