]> git.pld-linux.org Git - packages/llvm.git/blame - llvm-pld.patch
- updated to 3.4.1
[packages/llvm.git] / llvm-pld.patch
CommitLineData
11b6f380
JB
1--- llvm-3.4.1.src/tools/clang/lib/Driver/ToolChains.cpp.orig 2014-05-22 21:48:10.216006217 +0200
2+++ llvm-3.4.1.src/tools/clang/lib/Driver/ToolChains.cpp 2014-05-23 17:11:10.551218440 +0200
3@@ -1122,12 +1122,14 @@
f981d747
PS
4
5 static const char *const X86_64LibDirs[] = { "/lib64", "/lib" };
6 static const char *const X86_64Triples[] = {
11b6f380
JB
7+ "x86_64-pld-linux", "amd64-pld-linux",
8 "x86_64-linux-gnu", "x86_64-unknown-linux-gnu", "x86_64-pc-linux-gnu",
9 "x86_64-redhat-linux6E", "x86_64-redhat-linux", "x86_64-suse-linux",
10 "x86_64-manbo-linux-gnu", "x86_64-linux-gnu", "x86_64-slackware-linux"
f981d747
PS
11 };
12 static const char *const X86LibDirs[] = { "/lib32", "/lib" };
13 static const char *const X86Triples[] = {
11b6f380
JB
14+ "i686-pld-linux", "i586-pld-linux", "i485-pld-linux", "i386-pld-linux", "athlon-pld-linux",
15 "i686-linux-gnu", "i686-pc-linux-gnu", "i486-linux-gnu", "i386-linux-gnu",
16 "i386-redhat-linux6E", "i686-redhat-linux", "i586-redhat-linux",
17 "i386-redhat-linux", "i586-suse-linux", "i486-slackware-linux",
18@@ -2167,6 +2169,7 @@
4ad1976b 19
11b6f380 20 enum Distro {
4ad1976b
PS
21 ArchLinux,
22+ PLDLinux,
23 DebianLenny,
24 DebianSqueeze,
25 DebianWheezy,
11b6f380
JB
26@@ -2209,6 +2212,10 @@
27 return Distro >= UbuntuHardy && Distro <= UbuntuTrusty;
4ad1976b
PS
28 }
29
1628dc68 30+static bool IsPLD(enum Distro Distro) {
4ad1976b
PS
31+ return Distro == PLDLinux;
32+}
33+
1628dc68 34 static Distro DetectDistro(llvm::Triple::ArchType Arch) {
f981d747 35 OwningPtr<llvm::MemoryBuffer> File;
4ad1976b 36 if (!llvm::MemoryBuffer::getFile("/etc/lsb-release", File)) {
11b6f380
JB
37@@ -2276,6 +2283,9 @@
38 if (llvm::sys::fs::exists("/etc/arch-release"))
4ad1976b
PS
39 return ArchLinux;
40
11b6f380 41+ if (!llvm::sys::fs::exists("/etc/pld-release"))
4ad1976b
PS
42+ return PLDLinux;
43+
44 return UnknownDistro;
45 }
46
11b6f380 47@@ -2382,7 +2392,7 @@
4ad1976b 48
1628dc68 49 Distro Distro = DetectDistro(Arch);
4ad1976b 50
11b6f380
JB
51- if (IsOpenSUSE(Distro) || IsUbuntu(Distro)) {
52+ if (IsOpenSUSE(Distro) || IsUbuntu(Distro) || IsPLD(Distro)) {
4ad1976b
PS
53 ExtraOpts.push_back("-z");
54 ExtraOpts.push_back("relro");
ce9cc204 55 }
11b6f380 56@@ -2402,7 +2412,7 @@
f981d747
PS
57 // ABI requires a mapping between the GOT and the symbol table.
58 // Android loader does not support .gnu.hash.
c999855f 59 if (!IsMips && !IsAndroid) {
11b6f380
JB
60- if (IsRedhat(Distro) || IsOpenSUSE(Distro) ||
61+ if (IsRedhat(Distro) || IsOpenSUSE(Distro) || IsPLD(Distro) ||
f981d747
PS
62 (IsUbuntu(Distro) && Distro >= UbuntuMaverick))
63 ExtraOpts.push_back("--hash-style=gnu");
11b6f380
JB
64
65@@ -2411,11 +2421,11 @@
f981d747
PS
66 ExtraOpts.push_back("--hash-style=both");
67 }
4ad1976b
PS
68
69- if (IsRedhat(Distro))
70+ if (IsRedhat(Distro) || IsPLD(Distro))
71 ExtraOpts.push_back("--no-add-needed");
ce9cc204 72
4ad1976b 73 if (Distro == DebianSqueeze || Distro == DebianWheezy ||
11b6f380
JB
74- Distro == DebianJessie || IsOpenSUSE(Distro) ||
75+ Distro == DebianJessie || IsOpenSUSE(Distro) || IsPLD(Distro) ||
4ad1976b 76 (IsRedhat(Distro) && Distro != RHEL4 && Distro != RHEL5) ||
f981d747
PS
77 (IsUbuntu(Distro) && Distro >= UbuntuKarmic))
78 ExtraOpts.push_back("--build-id");
This page took 0.09274 seconds and 4 git commands to generate.