summaryrefslogtreecommitdiff
path: root/system/clang/clang-0004-Add-musl-targets.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-03-07 15:21:48 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-03-07 15:21:48 -0600
commit7442499990b44130ad9de911808161177b214322 (patch)
treee0f9588b2552682e1176322fe19b6d15b67e9c47 /system/clang/clang-0004-Add-musl-targets.patch
parent00f714f7a538159c8a821e1872c1d39d75cbf144 (diff)
downloadpackages-7442499990b44130ad9de911808161177b214322.tar.gz
packages-7442499990b44130ad9de911808161177b214322.tar.bz2
packages-7442499990b44130ad9de911808161177b214322.tar.xz
packages-7442499990b44130ad9de911808161177b214322.zip
system/clang: yay, a non-GCC compiler
Diffstat (limited to 'system/clang/clang-0004-Add-musl-targets.patch')
-rw-r--r--system/clang/clang-0004-Add-musl-targets.patch116
1 files changed, 116 insertions, 0 deletions
diff --git a/system/clang/clang-0004-Add-musl-targets.patch b/system/clang/clang-0004-Add-musl-targets.patch
new file mode 100644
index 000000000..d77294980
--- /dev/null
+++ b/system/clang/clang-0004-Add-musl-targets.patch
@@ -0,0 +1,116 @@
+From: Natanael Copa <ncopa@alpinelinux.org>
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Sun, 16 Apr 2017 16:49:00 +0100
+Subject: [PATCH] Add musl targets
+
+--- a/lib/Driver/ToolChains.cpp
++++ b/lib/Driver/ToolChains.cpp
+@@ -1644,7 +1644,8 @@
+ case llvm::Triple::arm:
+ case llvm::Triple::thumb:
+ LibDirs.append(begin(ARMLibDirs), end(ARMLibDirs));
+- if (TargetTriple.getEnvironment() == llvm::Triple::GNUEABIHF) {
++ if (TargetTriple.getEnvironment() == llvm::Triple::GNUEABIHF ||
++ TargetTriple.getEnvironment() == llvm::Triple::MuslEABIHF) {
+ TripleAliases.append(begin(ARMHFTriples), end(ARMHFTriples));
+ } else {
+ TripleAliases.append(begin(ARMTriples), end(ARMTriples));
+@@ -1653,7 +1654,8 @@
+ case llvm::Triple::armeb:
+ case llvm::Triple::thumbeb:
+ LibDirs.append(begin(ARMebLibDirs), end(ARMebLibDirs));
+- if (TargetTriple.getEnvironment() == llvm::Triple::GNUEABIHF) {
++ if (TargetTriple.getEnvironment() == llvm::Triple::GNUEABIHF ||
++ TargetTriple.getEnvironment() == llvm::Triple::MuslEABIHF) {
+ TripleAliases.append(begin(ARMebHFTriples), end(ARMebHFTriples));
+ } else {
+ TripleAliases.append(begin(ARMebTriples), end(ARMebTriples));
+@@ -3956,7 +3958,8 @@
+ // regardless of what the actual target triple is.
+ case llvm::Triple::arm:
+ case llvm::Triple::thumb:
+- if (TargetEnvironment == llvm::Triple::GNUEABIHF) {
++ if (TargetEnvironment == llvm::Triple::GNUEABIHF ||
++ TargetEnvironment == llvm::Triple::MuslEABIHF) {
+ if (D.getVFS().exists(SysRoot + "/lib/arm-linux-gnueabihf"))
+ return "arm-linux-gnueabihf";
+ } else {
+@@ -3966,7 +3969,8 @@
+ break;
+ case llvm::Triple::armeb:
+ case llvm::Triple::thumbeb:
+- if (TargetEnvironment == llvm::Triple::GNUEABIHF) {
++ if (TargetEnvironment == llvm::Triple::GNUEABIHF ||
++ TargetEnvironment == llvm::Triple::MuslEABIHF) {
+ if (D.getVFS().exists(SysRoot + "/lib/armeb-linux-gnueabihf"))
+ return "armeb-linux-gnueabihf";
+ } else {
+@@ -4334,6 +4338,12 @@
+ ArchName = "armeb";
+ IsArm = true;
+ break;
++ case llvm::Triple::ppc:
++ ArchName = "powerpc";
++ break;
++ case llvm::Triple::x86:
++ ArchName = "i386";
++ break;
+ default:
+ ArchName = Triple.getArchName().str();
+ }
+@@ -4544,7 +4554,8 @@
+ break;
+ case llvm::Triple::arm:
+ case llvm::Triple::thumb:
+- if (getTriple().getEnvironment() == llvm::Triple::GNUEABIHF)
++ if (getTriple().getEnvironment() == llvm::Triple::GNUEABIHF ||
++ getTriple().getEnvironment() == llvm::Triple::MuslEABIHF)
+ MultiarchIncludeDirs = ARMHFMultiarchIncludeDirs;
+ else
+ MultiarchIncludeDirs = ARMMultiarchIncludeDirs;
+
+--- a/lib/Driver/Tools.cpp
++++ b/lib/Driver/Tools.cpp
+@@ -953,6 +953,7 @@
+ case llvm::Triple::FreeBSD:
+ switch (Triple.getEnvironment()) {
+ case llvm::Triple::GNUEABIHF:
++ case llvm::Triple::MuslEABIHF:
+ ABI = FloatABI::Hard;
+ break;
+ default:
+@@ -9198,6 +9200,8 @@
+ switch (getToolChain().getTriple().getEnvironment()) {
+ case llvm::Triple::GNUEABIHF:
+ case llvm::Triple::GNUEABI:
++ case llvm::Triple::MuslEABIHF:
++ case llvm::Triple::MuslEABI:
+ case llvm::Triple::EABI:
+ CmdArgs.push_back("-meabi=5");
+ break;
+@@ -9541,10 +9545,12 @@
+ switch (getToolChain().getTriple().getEnvironment()) {
+ case llvm::Triple::EABI:
+ case llvm::Triple::GNUEABI:
++ case llvm::Triple::MuslEABI:
+ CmdArgs.push_back("armelf_nbsd_eabi");
+ break;
+ case llvm::Triple::EABIHF:
+ case llvm::Triple::GNUEABIHF:
++ case llvm::Triple::MuslEABIHF:
+ CmdArgs.push_back("armelf_nbsd_eabihf");
+ break;
+ default:
+@@ -9559,10 +9565,12 @@
+ switch (getToolChain().getTriple().getEnvironment()) {
+ case llvm::Triple::EABI:
+ case llvm::Triple::GNUEABI:
++ case llvm::Triple::MuslEABI:
+ CmdArgs.push_back("armelfb_nbsd_eabi");
+ break;
+ case llvm::Triple::EABIHF:
+ case llvm::Triple::GNUEABIHF:
++ case llvm::Triple::MuslEABIHF:
+ CmdArgs.push_back("armelfb_nbsd_eabihf");
+ break;
+ default: