From b58a151493bb9b68b08d83b919aba8fa9f9710c5 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Sun, 26 Aug 2018 13:35:40 -0400 Subject: [PATCH] build: Link against libgcc_s.so.1 instead of libgcc_s.so. The latter is not just a symlink to the former, but is a small pseudo- library that tells the linker to use the .so.1 version instead. As we do not pass -L to this directory to the linker invocation, the linker thus cannot find it, and so errors out. We rightly do not want the linker doing "magic" things for us that we don't expect, and so even if this one case is fine, we shouldn't allow the linker to take care of this automatically for us when it comes to libroot and other core system functionality, especially as going forward we may indeed add a second libgcc version due to ABI breaks. Instead, link against .so.1 directly. Fixes the build breakage caused by the GCC 7 bump. --- build/jam/BuildFeatures | 2 +- build/jam/SystemLibraryRules | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/jam/BuildFeatures b/build/jam/BuildFeatures index ae2fdf81b2..2ed030147a 100644 --- a/build/jam/BuildFeatures +++ b/build/jam/BuildFeatures @@ -43,7 +43,7 @@ if $(TARGET_PACKAGING_ARCH) != x86_gcc2 { if [ IsPackageAvailable gcc_syslibs ] { ExtractBuildFeatureArchives gcc_syslibs : file: base gcc_syslibs - libgcc_s.so: $(libDir)/libgcc_s.so + libgcc_s.so.1: $(libDir)/libgcc_s.so.1 libstdc++.so: $(libDir)/libstdc++.so libsupc++.so: $(libDir)/libsupc++.so ; diff --git a/build/jam/SystemLibraryRules b/build/jam/SystemLibraryRules index 93b12e01fc..a88fa04aee 100644 --- a/build/jam/SystemLibraryRules +++ b/build/jam/SystemLibraryRules @@ -173,7 +173,7 @@ rule TargetLibgcc asPath # return libgcc_s.so from the gcc_syslibs build feature and libgcc.a # from the gcc_syslibs_devel build feature. return [ - BuildFeatureAttribute gcc_syslibs : libgcc_s.so : $(flags) + BuildFeatureAttribute gcc_syslibs : libgcc_s.so.1 : $(flags) ] [ BuildFeatureAttribute gcc_syslibs_devel : libgcc.a : $(flags) ] ;