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