From 949cf6ac85e384223acbc2450558fe566e18c256 Mon Sep 17 00:00:00 2001 From: Murai Takashi Date: Sun, 19 Apr 2015 17:56:19 +0900 Subject: [PATCH] Fix GCC 5 build. * Add -fgnu89-inline flag for libroot/posix/glibc * Change __GNUC__ == 4 to __GNUC__ >= 4 Signed-off-by: Adrien Destugues Fixes #11990, most of the changes had already been done. --- headers/private/media/ServerInterface.h | 2 +- src/kits/interface/Rect.cpp | 4 ++-- src/system/runtime_loader/elf_load_image.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/headers/private/media/ServerInterface.h b/headers/private/media/ServerInterface.h index 59991e617d..177b18a327 100644 --- a/headers/private/media/ServerInterface.h +++ b/headers/private/media/ServerInterface.h @@ -190,7 +190,7 @@ struct reply_data { struct command_data { // yes, it's empty ;) -#if __GNUC__ == 4 +#if __GNUC__ >= 4 int32 _padding; // GCC 2 and GCC 4 treat empty structures differently #endif diff --git a/src/kits/interface/Rect.cpp b/src/kits/interface/Rect.cpp index 06d4e38a49..3c9a0d659a 100644 --- a/src/kits/interface/Rect.cpp +++ b/src/kits/interface/Rect.cpp @@ -332,7 +332,7 @@ OffsetToCopy__5BRectff(BRect* self, float dx, float dy) } -#elif __GNUC__ == 4 +#elif __GNUC__ >= 4 // TODO: remove this when new GCC 4 packages have to be built anyway @@ -390,4 +390,4 @@ _ZN5BRect12OffsetToCopyEff(BRect* self, float dx, float dy) } -#endif // __GNUC__ == 4 +#endif // __GNUC__ >= 4 diff --git a/src/system/runtime_loader/elf_load_image.cpp b/src/system/runtime_loader/elf_load_image.cpp index 011094839a..cfa4e34fcf 100644 --- a/src/system/runtime_loader/elf_load_image.cpp +++ b/src/system/runtime_loader/elf_load_image.cpp @@ -552,7 +552,7 @@ load_image(char const* name, image_type type, const char* rpath, #if __GNUC__ == 2 if ((image->abi & B_HAIKU_ABI_MAJOR) == B_HAIKU_ABI_GCC_4) sSearchPathSubDir = "x86"; - #elif __GNUC__ == 4 + #elif __GNUC__ >= 4 if ((image->abi & B_HAIKU_ABI_MAJOR) == B_HAIKU_ABI_GCC_2) sSearchPathSubDir = "x86_gcc2"; #endif