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.
This commit is contained in:
Augustin Cavalier
2018-08-26 13:35:40 -04:00
parent 5fd406b4c8
commit b58a151493
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
;
+1 -1
View File
@@ -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)
] ;