diff options
Diffstat (limited to 'main/llvm/clang-3.0-alpine-linux.patch')
-rw-r--r-- | main/llvm/clang-3.0-alpine-linux.patch | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/main/llvm/clang-3.0-alpine-linux.patch b/main/llvm/clang-3.0-alpine-linux.patch new file mode 100644 index 0000000000..dedb6c2512 --- /dev/null +++ b/main/llvm/clang-3.0-alpine-linux.patch @@ -0,0 +1,64 @@ +diff --git a/tools/clang/lib/Driver/ToolChains.cpp b/tools/clang/lib/Driver/ToolChains.cpp +index eb730e5..3e4afae 100644 +--- a/tools/clang/lib/Driver/ToolChains.cpp ++++ b/tools/clang/lib/Driver/ToolChains.cpp +@@ -1377,6 +1377,7 @@ Tool &AuroraUX::SelectTool(const Compilation &C, const JobAction &JA, + /// Linux toolchain (very bare-bones at the moment). + + enum LinuxDistro { ++ AlpineLinux, + ArchLinux, + DebianLenny, + DebianSqueeze, +@@ -1507,6 +1508,9 @@ static LinuxDistro DetectLinuxDistro(llvm::Triple::ArchType Arch) { + 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; + } + +@@ -1655,7 +1659,8 @@ Linux::GCCInstallationDetector::GCCInstallationDetector(const Driver &D) + "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" + }; + LibDirs.append(X86_64LibDirs, + X86_64LibDirs + llvm::array_lengthof(X86_64LibDirs)); +@@ -1672,7 +1677,8 @@ Linux::GCCInstallationDetector::GCCInstallationDetector(const Driver &D) + "i586-redhat-linux", + "i386-redhat-linux", + "i586-suse-linux", +- "i486-slackware-linux" ++ "i486-slackware-linux", ++ "i486-alpine-linux-uclibc" + }; + LibDirs.append(X86LibDirs, X86LibDirs + llvm::array_lengthof(X86LibDirs)); + Triples.append(X86Triples, X86Triples + llvm::array_lengthof(X86Triples)); +diff --git a/tools/clang/lib/Driver/Tools.cpp b/tools/clang/lib/Driver/Tools.cpp +index 6151e88..d811789 100644 +--- a/tools/clang/lib/Driver/Tools.cpp ++++ b/tools/clang/lib/Driver/Tools.cpp +@@ -4308,7 +4308,7 @@ void linuxtools::Link::ConstructJob(Compilation &C, const JobAction &JA, + !Args.hasArg(options::OPT_shared))) { + CmdArgs.push_back("-dynamic-linker"); + if (ToolChain.getArch() == llvm::Triple::x86) +- CmdArgs.push_back("/lib/ld-linux.so.2"); ++ CmdArgs.push_back("/lib/ld-uClibc.so.0.9.32"); + else if (ToolChain.getArch() == llvm::Triple::arm || + ToolChain.getArch() == llvm::Triple::thumb) + CmdArgs.push_back("/lib/ld-linux.so.3"); +@@ -4317,7 +4317,7 @@ void linuxtools::Link::ConstructJob(Compilation &C, const JobAction &JA, + else if (ToolChain.getArch() == llvm::Triple::ppc64) + CmdArgs.push_back("/lib64/ld64.so.1"); + else +- CmdArgs.push_back("/lib64/ld-linux-x86-64.so.2"); ++ CmdArgs.push_back("/lib/ld64-uClibc.so.0.9.32"); + } + + CmdArgs.push_back("-o"); |