diff options
Diffstat (limited to 'main/llvm/llvm-3.3-alpine-linux.patch')
-rw-r--r-- | main/llvm/llvm-3.3-alpine-linux.patch | 159 |
1 files changed, 0 insertions, 159 deletions
diff --git a/main/llvm/llvm-3.3-alpine-linux.patch b/main/llvm/llvm-3.3-alpine-linux.patch deleted file mode 100644 index bfb9de0328..0000000000 --- a/main/llvm/llvm-3.3-alpine-linux.patch +++ /dev/null @@ -1,159 +0,0 @@ ---- llvm-3.3.src.orig/include/llvm/ADT/Triple.h -+++ llvm-3.3.src/include/llvm/ADT/Triple.h -@@ -117,7 +117,11 @@ - EABI, - MachO, - Android, -- ELF -+ ELF, -+ UClibc, -+ Musl, -+ MuslEABI, -+ MuslEABIHF - }; - - private: ---- llvm-3.3.src.orig/lib/Support/Triple.cpp -+++ llvm-3.3.src/lib/Support/Triple.cpp -@@ -151,6 +151,10 @@ - case MachO: return "macho"; - case Android: return "android"; - case ELF: return "elf"; -+ case UClibc: return "uclibc"; -+ case Musl: return "musl"; -+ case MuslEABI: return "muslgnueabi"; -+ case MuslEABIHF: return "muslgnueabihf"; - } - - llvm_unreachable("Invalid EnvironmentType!"); -@@ -300,6 +304,10 @@ - .StartsWith("macho", Triple::MachO) - .StartsWith("android", Triple::Android) - .StartsWith("elf", Triple::ELF) -+ .StartsWith("uclibc", Triple::UClibc) -+ .StartsWith("muslgnueabihf", Triple::MuslEABIHF) -+ .StartsWith("muslgnueabi", Triple::MuslEABI) -+ .StartsWith("musl", Triple::Musl) - .Default(Triple::UnknownEnvironment); - } - ---- llvm-3.3.src.orig/tools/clang/lib/Driver/ToolChains.cpp -+++ llvm-3.3.src/tools/clang/lib/Driver/ToolChains.cpp -@@ -1086,7 +1086,9 @@ - }; - static const char *const ARMHFTriples[] = { - "arm-linux-gnueabihf", -- "armv7hl-redhat-linux-gnueabi" -+ "armv7hl-redhat-linux-gnueabi", -+ "armv6-alpine-linux-muslgnueabihf", -+ "armv7-alpine-linux-muslgnueabihf" - }; - - static const char *const X86_64LibDirs[] = { "/lib64", "/lib" }; -@@ -1099,7 +1101,9 @@ - "x86_64-suse-linux", - "x86_64-manbo-linux-gnu", - "x86_64-linux-gnu", -- "x86_64-slackware-linux" -+ "x86_64-slackware-linux", -+ "x86_64-alpine-linux-uclibc", -+ "x86_64-alpine-linux-musl" - }; - static const char *const X86LibDirs[] = { "/lib32", "/lib" }; - static const char *const X86Triples[] = { -@@ -1113,7 +1117,9 @@ - "i386-redhat-linux", - "i586-suse-linux", - "i486-slackware-linux", -- "i686-montavista-linux" -+ "i686-montavista-linux", -+ "i486-alpine-linux-uclibc", -+ "i486-alpine-linux-musl" - }; - - static const char *const MIPSLibDirs[] = { "/lib" }; -@@ -1980,6 +1986,7 @@ - /// Distribution (very bare-bones at the moment). - - enum Distro { -+ AlpineLinux, - ArchLinux, - DebianLenny, - DebianSqueeze, -@@ -2108,6 +2115,9 @@ - - if (!llvm::sys::fs::exists("/etc/arch-release", Exists) && Exists) - return ArchLinux; -+ -+ if (!llvm::sys::fs::exists("/etc/alpine-release", Exists) && Exists) -+ return AlpineLinux; - - return UnknownDistro; - } ---- llvm-3.3.src.orig/tools/clang/lib/Driver/Tools.cpp -+++ llvm-3.3.src/tools/clang/lib/Driver/Tools.cpp -@@ -5983,16 +5983,37 @@ - CmdArgs.push_back("-dynamic-linker"); - if (isAndroid) - CmdArgs.push_back("/system/bin/linker"); -- else if (ToolChain.getArch() == llvm::Triple::x86) -- CmdArgs.push_back("/lib/ld-linux.so.2"); -- else if (ToolChain.getArch() == llvm::Triple::aarch64) -+ else if (ToolChain.getArch() == llvm::Triple::x86) { -+ switch (ToolChain.getTriple().getEnvironment()) { -+ case llvm::Triple::UClibc: -+ CmdArgs.push_back("/lib/ld-uClibc.so.0.9.32"); -+ break; -+ case llvm::Triple::Musl: -+ CmdArgs.push_back("/lib/ld-musl-i386.so.1"); -+ break; -+ default: -+ CmdArgs.push_back("/lib/ld-linux.so.2"); -+ break; -+ } -+ } else if (ToolChain.getArch() == llvm::Triple::aarch64) - CmdArgs.push_back("/lib/ld-linux-aarch64.so.1"); - else if (ToolChain.getArch() == llvm::Triple::arm || - ToolChain.getArch() == llvm::Triple::thumb) { -- if (ToolChain.getTriple().getEnvironment() == llvm::Triple::GNUEABIHF) -+ switch (ToolChain.getTriple().getEnvironment()) { -+ case llvm::Triple::Musl: -+ case llvm::Triple::MuslEABI: -+ CmdArgs.push_back("/lib/ld-musl-arm.so.3"); -+ break; -+ case llvm::Triple::MuslEABIHF: -+ CmdArgs.push_back("/lib/ld-musl-armhf.so.3"); -+ break; -+ case llvm::Triple::GNUEABIHF: - CmdArgs.push_back("/lib/ld-linux-armhf.so.3"); -- else -+ break; -+ default: - CmdArgs.push_back("/lib/ld-linux.so.3"); -+ break; -+ } - } - else if (ToolChain.getArch() == llvm::Triple::mips || - ToolChain.getArch() == llvm::Triple::mipsel) -@@ -6009,8 +6030,19 @@ - else if (ToolChain.getArch() == llvm::Triple::ppc64 || - ToolChain.getArch() == llvm::Triple::systemz) - CmdArgs.push_back("/lib64/ld64.so.1"); -- else -- CmdArgs.push_back("/lib64/ld-linux-x86-64.so.2"); -+ else { -+ switch (ToolChain.getTriple().getEnvironment()) { -+ case llvm::Triple::Musl: -+ CmdArgs.push_back("/lib/ld-musl-x86_64.so.1"); -+ break; -+ case llvm::Triple::UClibc: -+ CmdArgs.push_back("/lib/ld64-uClibc.so.0.9.32"); -+ break; -+ default: -+ CmdArgs.push_back("/lib64/ld-linux-x86-64.so.2"); -+ break; -+ } -+ } - } - - CmdArgs.push_back("-o"); |