aboutsummaryrefslogtreecommitdiffstats
path: root/main/clang/40-fix-ld-name-on-x86.patch
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 /main/clang/40-fix-ld-name-on-x86.patch
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
Diffstat (limited to 'main/clang/40-fix-ld-name-on-x86.patch')
-rw-r--r--main/clang/40-fix-ld-name-on-x86.patch20
1 files changed, 20 insertions, 0 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();
+ }