Ticket #11990: 0001-Fix-GCC-5-build.2.patch

File 0001-Fix-GCC-5-build.2.patch, 4.1 KB (added by mt, 5 years ago)

spelling fix, GUNC -> GNUC

  • build/jam/ArchitectureRules

    From 64a7d2a1d67866fd94262b97ad906a6589f19aaa Mon Sep 17 00:00:00 2001
    From: Murai Takashi <tmurai01@gmail.com>
    Date: Sun, 19 Apr 2015 17:56:19 +0900
    Subject: [PATCH 1/6] Fix GCC 5 build.
    * Add -fgnu89-inline flag for libroot/posix/glibc
    * Change __GNUC__ == 4 to __GNUC__ >= 4
    
    ---
     build/jam/ArchitectureRules                  | 8 ++++++++
     headers/build/os/BeBuild.h                   | 2 +-
     headers/os/BeBuild.h                         | 2 +-
     headers/private/kernel/util/AutoLock.h       | 2 +-
     headers/private/media/ServerInterface.h      | 2 +-
     src/kits/interface/Rect.cpp                  | 4 ++--
     src/system/runtime_loader/elf_load_image.cpp | 2 +-
     7 files changed, 15 insertions(+), 7 deletions(-)
    
    diff --git a/build/jam/ArchitectureRules b/build/jam/ArchitectureRules
    index 81d137a..ab454bc 100644
    a b rule ArchitectureSetupWarnings architecture  
    470470        WARNINGS on $(file) = $(WARNINGS) ;
    471471    }
    472472
     473    if $(gccVersion[1]) = 5 {
     474        # We need -fgnu89-inline, as GCC5 changed 'extern inline' semantics.
     475        # Please see https://gcc.gnu.org/gcc-5/porting_to.html .
     476        AppendToConfigVar CCFLAGS :
     477            HAIKU_TOP src system libroot posix glibc :
     478            -fgnu89-inline : global ;
     479    }
     480
    473481    if $(HAIKU_CC_IS_CLANG_$(architecture)) = 1 {
    474482        # We need -integrated-as, as otherwise Clang uses GCC as assembler and
    475483        # passes -fheinous-gnu-extensions to GCC, which GCC does not understand
  • headers/build/os/BeBuild.h

    diff --git a/headers/build/os/BeBuild.h b/headers/build/os/BeBuild.h
    index 3130e03..11a1cd8 100644
    a b  
    3737
    3838#if __GNUC__ == 2
    3939#   define B_HAIKU_ABI                  B_HAIKU_ABI_GCC_2_HAIKU
    40 #elif __GNUC__ == 3 || __GNUC__ == 4
     40#elif __GNUC__ == 3 || __GNUC__ >= 4
    4141#   define B_HAIKU_ABI                  B_HAIKU_ABI_GCC_4
    4242#else
    4343#   error Unsupported gcc version!
  • headers/os/BeBuild.h

    diff --git a/headers/os/BeBuild.h b/headers/os/BeBuild.h
    index 509ccf5..5fe41f4 100644
    a b  
    4545
    4646#if __GNUC__ == 2
    4747#   define B_HAIKU_ABI                  B_HAIKU_ABI_GCC_2_HAIKU
    48 #elif __GNUC__ == 4
     48#elif __GNUC__ >= 4
    4949#   define B_HAIKU_ABI                  B_HAIKU_ABI_GCC_4
    5050#else
    5151#   error Unsupported gcc version!
  • headers/private/kernel/util/AutoLock.h

    diff --git a/headers/private/kernel/util/AutoLock.h b/headers/private/kernel/util/AutoLock.h
    index 3151065..f724503 100644
    a b class InterruptsSpinLocking {  
    132132public:
    133133// NOTE: work-around for annoying GCC 4 "fState may be used uninitialized"
    134134// warning.
    135 #if __GNUC__ == 4
     135#if __GNUC__ >= 4
    136136    InterruptsSpinLocking()
    137137        :
    138138        fState(0)
  • headers/private/media/ServerInterface.h

    diff --git a/headers/private/media/ServerInterface.h b/headers/private/media/ServerInterface.h
    index 13249eb..d8bebc6 100644
    a b struct reply_data {  
    180180struct command_data {
    181181    // yes, it's empty ;)
    182182
    183 #if __GNUC__ == 4
     183#if __GNUC__ >= 4
    184184    int32 _padding;
    185185        // GCC 2 and GCC 4 treat empty structures differently
    186186#endif
  • src/kits/interface/Rect.cpp

    diff --git a/src/kits/interface/Rect.cpp b/src/kits/interface/Rect.cpp
    index 06d4e38..3c9a0d6 100644
    a b OffsetToCopy__5BRectff(BRect* self, float dx, float dy)  
    332332}
    333333
    334334
    335 #elif __GNUC__ == 4
     335#elif __GNUC__ >= 4
    336336// TODO: remove this when new GCC 4 packages have to be built anyway
    337337
    338338
    _ZN5BRect12OffsetToCopyEff(BRect* self, float dx, float dy)  
    390390}
    391391
    392392
    393 #endif  // __GNUC__ == 4
     393#endif  // __GNUC__ >= 4
  • src/system/runtime_loader/elf_load_image.cpp

    diff --git a/src/system/runtime_loader/elf_load_image.cpp b/src/system/runtime_loader/elf_load_image.cpp
    index 0110948..cfa4e34 100644
    a b load_image(char const* name, image_type type, const char* rpath,  
    552552        #if __GNUC__ == 2
    553553            if ((image->abi & B_HAIKU_ABI_MAJOR) == B_HAIKU_ABI_GCC_4)
    554554                sSearchPathSubDir = "x86";
    555         #elif __GNUC__ == 4
     555        #elif __GNUC__ >= 4
    556556            if ((image->abi & B_HAIKU_ABI_MAJOR) == B_HAIKU_ABI_GCC_2)
    557557                sSearchPathSubDir = "x86_gcc2";
    558558        #endif