From c30513840a64b5d4cac42489a0d11ab1bfa90f77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Thu, 1 Nov 2018 15:14:04 +0100 Subject: [PATCH] runtime_loader: correctly detect gcc7 abi as gcc4 abi compatible. Change-Id: I0e3df832e2fcc0b687344f54d5b0a639f5add370 Reviewed-on: https://review.haiku-os.org/649 Reviewed-by: waddlesplash --- src/system/runtime_loader/elf_haiku_version.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/system/runtime_loader/elf_haiku_version.cpp b/src/system/runtime_loader/elf_haiku_version.cpp index 7e61df133c..60a6c37358 100644 --- a/src/system/runtime_loader/elf_haiku_version.cpp +++ b/src/system/runtime_loader/elf_haiku_version.cpp @@ -117,6 +117,8 @@ analyze_object_gcc_version(int fd, image_t* image, elf_ehdr& eheader, // GCC: (GNU) 2.95.3-haiku-080322 // GCC: (GNU) 4.1.2 // GCC: (2016_02_29) 5.3.0 + // GCC: (2018_05_01) 7.3.0 + // GCC: (GNU) 7.3.0 // FIXME this does not handle binaries generated with clang or other // compilers. @@ -191,10 +193,10 @@ analyze_object_gcc_version(int fd, image_t* image, elf_ehdr& eheader, else image->abi = B_HAIKU_ABI_GCC_2_BEOS; } else { - if (gccMajor == 5) { - // The ABI changes in GCC 5 are optional, and currently we are using - // it in backwards compatible mode. So, it is still generating ABI - // version 4. + if (gccMajor >= 5) { + // The ABI changes in libstdc++ 5+ are optional, and currently we + // are using it in backwards compatible mode. So, it is still + // generating ABI version 4. gccMajor = 4; } image->abi = gccMajor << 16;