aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2020-05-21 21:41:21 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2020-05-27 12:55:28 +0000
commit7445adce501f8473efdb93b17b5eaf2f1445ed4c (patch)
treed84a60a8c8cec4e0881a09ac65598f34a0f529c0
parent1206e72ffe97777130d477ac43e1047337e01698 (diff)
downloadaports-7445adce501f8473efdb93b17b5eaf2f1445ed4c.tar.gz
aports-7445adce501f8473efdb93b17b5eaf2f1445ed4c.tar.bz2
aports-7445adce501f8473efdb93b17b5eaf2f1445ed4c.tar.xz
main/clang: fix linking against ld-musl-i386.so.1 on x86
Previously clang linked against ld-musl-i586.so.1, which caused binaries to be nonfunctional. fixes #11357
-rw-r--r--main/clang/40-fix-ld-name-on-x86.patch20
-rw-r--r--main/clang/APKBUILD6
2 files changed, 24 insertions, 2 deletions
diff --git a/main/clang/40-fix-ld-name-on-x86.patch b/main/clang/40-fix-ld-name-on-x86.patch
new file mode 100644
index 0000000000..4150fa6f8d
--- /dev/null
+++ b/main/clang/40-fix-ld-name-on-x86.patch
@@ -0,0 +1,20 @@
+Upstream: No
+Author: Rasmus Thomsen <oss@cogitri.dev>
+Reason: We have a mismatch between the name of our target triplet and the
+name of the ld for musl
+diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp
+index bff1ab10..68ca89d9 100644
+--- a/lib/Driver/ToolChains/Linux.cpp
++++ b/lib/Driver/ToolChains/Linux.cpp
+@@ -531,6 +531,11 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
+ ArchName = "armeb";
+ IsArm = true;
+ break;
++ // FIXME: The Triplet name for x86 on Alpine Linux (i686) doesn't match
++ // up with the name for the ld (i386)!
++ case llvm::Triple::x86:
++ ArchName = "i386";
++ break;
+ default:
+ ArchName = Triple.getArchName().str();
+ }
diff --git a/main/clang/APKBUILD b/main/clang/APKBUILD
index 53e0cf027b..d37d981851 100644
--- a/main/clang/APKBUILD
+++ b/main/clang/APKBUILD
@@ -4,7 +4,7 @@
pkgname=clang
# Note: Update together with llvm.
pkgver=10.0.0
-pkgrel=1
+pkgrel=2
_llvmver=${pkgver%%.*}
pkgdesc="A C language family front-end for LLVM"
arch="all"
@@ -35,6 +35,7 @@ source="https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/c
10-add-musl-triples.patch
20-Enable-stack-protector-by-default-for-Alpine-Linux.patch
30-fix-python-shebangs.patch
+ 40-fix-ld-name-on-x86.patch
"
builddir="$srcdir/clang-$pkgver.src"
@@ -145,4 +146,5 @@ sha512sums="b1cccc13c46abcda3d689f51d486fa613ecec40c581c72d8b15951715100a2b8fb24
33b6019e64e9ac94bd7c000b77a4a927602a2705baa9b370e392a56b53fe09c8dad1ff7d583892729e9eb291440433ad7d71df768a96d927e4dbc1988fc01d99 clang-tools-extra-10.0.0.src.tar.xz
533558863dc7247202b2a739e1bd2d81a99a16be329370cb734d338284b5408ecd14fe78ac836aaf922e377334b7a3ebef532cf8395d91aafe346bf71eb8b7fc 10-add-musl-triples.patch
a8557c5a26774bf98548b9fe77cd54a1b0591bc75beffcb5fbd070986ba954d82255dddbcfcc884c07c3f433b1428c2a6ce649c3a158f4352f30e7057872335b 20-Enable-stack-protector-by-default-for-Alpine-Linux.patch
-c7f34b425b0dcea9752eeb7ff3d3a33af9cc45740fd3e77d52e4d610c5fd3daaa4d59138a255b057ef886915615a77ec1e6a447f3818b4b2724129c0ba354932 30-fix-python-shebangs.patch"
+c7f34b425b0dcea9752eeb7ff3d3a33af9cc45740fd3e77d52e4d610c5fd3daaa4d59138a255b057ef886915615a77ec1e6a447f3818b4b2724129c0ba354932 30-fix-python-shebangs.patch
+c945455cd02345ba84343fc69c82a684566fa7a38d59806035b5f07dce0a4b1892b428283005883f1c202ea87d75de60066497c127ab9292c060700e8f8081d7 40-fix-ld-name-on-x86.patch"