[haiku-commits] haiku: hrev43671 - build/jam src/system/kernel/vm src/system/kernel/arch/x86 src/apps/cortex/addons/common build/scripts

  • From: korli@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 19 Jan 2012 19:46:45 +0100 (CET)

hrev43671 adds 2 changesets to branch 'master'
old head: e4ff57c33f99608310f257d09cccf606f2b296c3
new head: c59b279b7173bcafb8f266aa753b2f9e6c578849

----------------------------------------------------------------------------

c40f318: Fix with enabled tracing.

c59b279: 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

                                   [ Jérôme Duval <jerome.duval@xxxxxxxxx> ]

----------------------------------------------------------------------------

5 files changed, 23 insertions(+), 22 deletions(-)
build/jam/BuildSetup                          |   28 ++++++++++----------
build/scripts/build_cross_tools_gcc4          |    2 +-
src/apps/cortex/addons/common/AudioBuffer.cpp |    4 +-
src/system/kernel/arch/x86/ioapic.cpp         |    4 +-
src/system/kernel/vm/vm.cpp                   |    7 +++--

############################################################################

Commit:      c40f31867bed1703736b0cc9193d017b60568da0
URL:         http://cgit.haiku-os.org/haiku/commit/?id=c40f318
Author:      Jérôme Duval <jerome.duval@xxxxxxxxx>
Date:        Mon Jan 16 22:09:36 2012 UTC

Fix with enabled tracing.

----------------------------------------------------------------------------

diff --git a/src/system/kernel/vm/vm.cpp b/src/system/kernel/vm/vm.cpp
index c6d6829..857bf22 100644
--- a/src/system/kernel/vm/vm.cpp
+++ b/src/system/kernel/vm/vm.cpp
@@ -1558,8 +1558,9 @@ vm_map_physical_memory(team_id team, const char* name, 
void** _address,
        addr_t mapOffset;
 
        TRACE(("vm_map_physical_memory(aspace = %ld, \"%s\", virtual = %p, "
-               "spec = %ld, size = %lu, protection = %ld, phys = %#lx)\n", 
team,
-               name, *_address, addressSpec, size, protection, 
physicalAddress));
+               "spec = %ld, size = %lu, protection = %ld, phys = %#" 
B_PRIxPHYSADDR
+               ")\n", team, name, *_address, addressSpec, size, protection,
+               physicalAddress));
 
        if (!arch_vm_supports_protection(protection))
                return B_NOT_SUPPORTED;
@@ -4301,7 +4302,7 @@ fault_get_page(PageFaultContext& context)
                // allocate a clean page
                page = vm_page_allocate_page(&context.reservation,
                        PAGE_STATE_ACTIVE | VM_PAGE_ALLOC_CLEAR);
-               FTRACE(("vm_soft_fault: just allocated page 0x%lx\n",
+               FTRACE(("vm_soft_fault: just allocated page 0x%" B_PRIxPHYSADDR 
"\n",
                        page->physical_page_number));
 
                // insert the new page into our cache

############################################################################

Revision:    hrev43671
Commit:      c59b279b7173bcafb8f266aa753b2f9e6c578849
URL:         http://cgit.haiku-os.org/haiku/commit/?id=c59b279
Author:      Jérôme Duval <jerome.duval@xxxxxxxxx>
Date:        Thu Jan 19 18:44:42 2012 UTC

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

----------------------------------------------------------------------------

diff --git a/build/jam/BuildSetup b/build/jam/BuildSetup
index c46977e..3288429 100644
--- a/build/jam/BuildSetup
+++ b/build/jam/BuildSetup
@@ -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.
diff --git a/build/scripts/build_cross_tools_gcc4 
b/build/scripts/build_cross_tools_gcc4
index fa20f7c..3c4ba83 100755
--- a/build/scripts/build_cross_tools_gcc4
+++ b/build/scripts/build_cross_tools_gcc4
@@ -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
 
diff --git a/src/apps/cortex/addons/common/AudioBuffer.cpp 
b/src/apps/cortex/addons/common/AudioBuffer.cpp
index 47613bb..f092127 100644
--- a/src/apps/cortex/addons/common/AudioBuffer.cpp
+++ b/src/apps/cortex/addons/common/AudioBuffer.cpp
@@ -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);
                
diff --git a/src/system/kernel/arch/x86/ioapic.cpp 
b/src/system/kernel/arch/x86/ioapic.cpp
index 78f6129..6d40b16 100644
--- a/src/system/kernel/arch/x86/ioapic.cpp
+++ b/src/system/kernel/arch/x86/ioapic.cpp
@@ -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;
                                }


Other related posts:

  • » [haiku-commits] haiku: hrev43671 - build/jam src/system/kernel/vm src/system/kernel/arch/x86 src/apps/cortex/addons/common build/scripts - korli