From 58542697c14bae5c8d81bb2c1cc60dd015cdc0c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Thu, 19 Jan 2017 19:04:09 +0100 Subject: {clang,llvm}_host: adds clang v3.8.1 and llvm v3.8.1 (via Redfoxmoon.) --- ...Add-Musl-MuslEABI-and-Musl-EABIHF-triples.patch | 112 +++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 patches/llvm_host/llvm-0001-Add-Musl-MuslEABI-and-Musl-EABIHF-triples.patch (limited to 'patches/llvm_host/llvm-0001-Add-Musl-MuslEABI-and-Musl-EABIHF-triples.patch') diff --git a/patches/llvm_host/llvm-0001-Add-Musl-MuslEABI-and-Musl-EABIHF-triples.patch b/patches/llvm_host/llvm-0001-Add-Musl-MuslEABI-and-Musl-EABIHF-triples.patch new file mode 100644 index 00000000..c1dfc5bd --- /dev/null +++ b/patches/llvm_host/llvm-0001-Add-Musl-MuslEABI-and-Musl-EABIHF-triples.patch @@ -0,0 +1,112 @@ +From 1cec99f6d53d442d8a8c9d2ed9f4a58f8fdc6412 Mon Sep 17 00:00:00 2001 +From: Natanael Copa +Date: Thu, 18 Feb 2016 08:30:07 +0100 +Subject: [PATCH 1/3] Add Musl, MuslEABI and Musl EABIHF triples + +--- + include/llvm/ADT/Triple.h | 11 +++++++++++ + lib/Support/Triple.cpp | 7 +++++++ + lib/Target/ARM/ARMSubtarget.h | 3 +++ + lib/Target/ARM/ARMTargetMachine.cpp | 2 ++ + 4 files changed, 23 insertions(+) + +diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h +index e01db0a..2fc4fc1 100644 +--- a/include/llvm/ADT/Triple.h ++++ b/include/llvm/ADT/Triple.h +@@ -174,6 +174,10 @@ public: + EABIHF, + Android, + ++ Musl, ++ MuslEABI, ++ MuslEABIHF, ++ + MSVC, + Itanium, + Cygnus, +@@ -544,6 +548,13 @@ public: + /// Tests whether the target is Android + bool isAndroid() const { return getEnvironment() == Triple::Android; } + ++ /// Tests whether the target is musl libc ++ bool isMusl() const { ++ return getEnvironment() == Triple::Musl || ++ getEnvironment() == Triple::MuslEABI || ++ getEnvironment() == Triple::MuslEABIHF; ++ } ++ + /// @} + /// @name Mutators + /// @{ +diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp +index 11afcf7..d90a06a 100644 +--- a/lib/Support/Triple.cpp ++++ b/lib/Support/Triple.cpp +@@ -199,6 +199,9 @@ const char *Triple::getEnvironmentTypeName(EnvironmentType Kind) { + case CODE16: return "code16"; + case EABI: return "eabi"; + case EABIHF: return "eabihf"; ++ case Musl: return "musl"; ++ case MuslEABIHF: return "muslgnueabihf"; ++ case MuslEABI: return "muslgnueabi"; + case Android: return "android"; + case MSVC: return "msvc"; + case Itanium: return "itanium"; +@@ -454,6 +457,9 @@ static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) { + .StartsWith("code16", Triple::CODE16) + .StartsWith("gnu", Triple::GNU) + .StartsWith("android", Triple::Android) ++ .StartsWith("muslgnueabihf", Triple::MuslEABIHF) ++ .StartsWith("muslgnueabi", Triple::MuslEABI) ++ .StartsWith("musl", Triple::Musl) + .StartsWith("msvc", Triple::MSVC) + .StartsWith("itanium", Triple::Itanium) + .StartsWith("cygnus", Triple::Cygnus) +@@ -1431,6 +1437,7 @@ StringRef Triple::getARMCPUForArch(StringRef MArch) const { + switch (getEnvironment()) { + case llvm::Triple::EABIHF: + case llvm::Triple::GNUEABIHF: ++ case llvm::Triple::MuslEABIHF: + return "arm1176jzf-s"; + default: + return "arm7tdmi"; +diff --git a/lib/Target/ARM/ARMSubtarget.h b/lib/Target/ARM/ARMSubtarget.h +index 4d54e57..7ed7ab7 100644 +--- a/lib/Target/ARM/ARMSubtarget.h ++++ b/lib/Target/ARM/ARMSubtarget.h +@@ -405,8 +405,10 @@ public: + bool isTargetEHABICompatible() const { + return (TargetTriple.getEnvironment() == Triple::EABI || + TargetTriple.getEnvironment() == Triple::GNUEABI || ++ TargetTriple.getEnvironment() == Triple::MuslEABI || + TargetTriple.getEnvironment() == Triple::EABIHF || + TargetTriple.getEnvironment() == Triple::GNUEABIHF || ++ TargetTriple.getEnvironment() == Triple::MuslEABIHF || + isTargetAndroid()) && + !isTargetDarwin() && !isTargetWindows(); + } +@@ -415,6 +417,7 @@ public: + // FIXME: this is invalid for WindowsCE + return TargetTriple.getEnvironment() == Triple::GNUEABIHF || + TargetTriple.getEnvironment() == Triple::EABIHF || ++ TargetTriple.getEnvironment() == Triple::MuslEABIHF || + isTargetWindows() || isAAPCS16_ABI(); + } + bool isTargetAndroid() const { return TargetTriple.isAndroid(); } +diff --git a/lib/Target/ARM/ARMTargetMachine.cpp b/lib/Target/ARM/ARMTargetMachine.cpp +index fca1901..25f5cf9 100644 +--- a/lib/Target/ARM/ARMTargetMachine.cpp ++++ b/lib/Target/ARM/ARMTargetMachine.cpp +@@ -101,6 +101,8 @@ computeTargetABI(const Triple &TT, StringRef CPU, + case llvm::Triple::GNUEABIHF: + case llvm::Triple::EABIHF: + case llvm::Triple::EABI: ++ case llvm::Triple::MuslEABI: ++ case llvm::Triple::MuslEABIHF: + TargetABI = ARMBaseTargetMachine::ARM_ABI_AAPCS; + break; + case llvm::Triple::GNU: +-- +2.7.3 + -- cgit v1.2.3