]> git.pld-linux.org Git - packages/llvm.git/blame - llvm-pld.patch
- started update to 3.7.0
[packages/llvm.git] / llvm-pld.patch
CommitLineData
b883cf1e
JB
1--- llvm-3.5.0.src/tools/clang/lib/Driver/ToolChains.cpp.orig 2014-10-01 21:07:02.242822402 +0200
2+++ llvm-3.5.0.src/tools/clang/lib/Driver/ToolChains.cpp 2014-10-01 21:29:07.449433463 +0200
3@@ -1333,6 +1333,7 @@
f981d747 4
41876fe7 5 static const char *const X86_64LibDirs[] = {"/lib64", "/lib"};
f981d747 6 static const char *const X86_64Triples[] = {
41876fe7
JR
7+ "x86_64-pld-linux", "amd64-pld-linux",
8 "x86_64-linux-gnu", "x86_64-unknown-linux-gnu",
9 "x86_64-pc-linux-gnu", "x86_64-redhat-linux6E",
10 "x86_64-redhat-linux", "x86_64-suse-linux",
b883cf1e 11@@ -1341,6 +1342,7 @@
41876fe7
JR
12 static const char *const X32LibDirs[] = {"/libx32"};
13 static const char *const X86LibDirs[] = {"/lib32", "/lib"};
f981d747 14 static const char *const X86Triples[] = {
41876fe7
JR
15+ "i686-pld-linux", "i586-pld-linux", "i486-pld-linux", "i386-pld-linux", "athlon-pld-linux",
16 "i686-linux-gnu", "i686-pc-linux-gnu", "i486-linux-gnu",
17 "i386-linux-gnu", "i386-redhat-linux6E", "i686-redhat-linux",
18 "i586-redhat-linux", "i386-redhat-linux", "i586-suse-linux",
b883cf1e
JB
19@@ -1370,6 +1372,7 @@
20
41876fe7 21 static const char *const PPCLibDirs[] = {"/lib32", "/lib"};
b883cf1e 22 static const char *const PPCTriples[] = {
41876fe7
JR
23+ "powerpc-pld-linux",
24 "powerpc-linux-gnu", "powerpc-unknown-linux-gnu", "powerpc-linux-gnuspe",
25 "powerpc-suse-linux", "powerpc-montavista-linuxspe"};
26 static const char *const PPC64LibDirs[] = {"/lib64", "/lib"};
b883cf1e
JB
27@@ -1385,14 +1388,14 @@
28 "ppc64le-redhat-linux" };
29
41876fe7
JR
30 static const char *const SPARCv8LibDirs[] = {"/lib32", "/lib"};
31- static const char *const SPARCv8Triples[] = {"sparc-linux-gnu",
32+ static const char *const SPARCv8Triples[] = {"sparc-pld-linux", "sparc-linux-gnu",
33 "sparcv8-linux-gnu"};
34 static const char *const SPARCv9LibDirs[] = {"/lib64", "/lib"};
35- static const char *const SPARCv9Triples[] = {"sparc64-linux-gnu",
36+ static const char *const SPARCv9Triples[] = {"sparc64-pld-linux", "sparc64-linux-gnu",
37 "sparcv9-linux-gnu"};
b883cf1e 38
41876fe7 39 static const char *const SystemZLibDirs[] = {"/lib64", "/lib"};
b883cf1e 40- static const char *const SystemZTriples[] = {
41876fe7
JR
41+ static const char *const SystemZTriples[] = {"s390x-pld-linux",
42 "s390x-linux-gnu", "s390x-unknown-linux-gnu", "s390x-ibm-linux-gnu",
43 "s390x-suse-linux", "s390x-redhat-linux"
b883cf1e
JB
44 };
45@@ -2778,6 +2781,7 @@
4ad1976b 46
11b6f380 47 enum Distro {
4ad1976b
PS
48 ArchLinux,
49+ PLDLinux,
50 DebianLenny,
51 DebianSqueeze,
52 DebianWheezy,
b883cf1e 53@@ -2820,6 +2824,10 @@
11b6f380 54 return Distro >= UbuntuHardy && Distro <= UbuntuTrusty;
4ad1976b
PS
55 }
56
1628dc68 57+static bool IsPLD(enum Distro Distro) {
4ad1976b
PS
58+ return Distro == PLDLinux;
59+}
60+
1628dc68 61 static Distro DetectDistro(llvm::Triple::ArchType Arch) {
b883cf1e
JB
62 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> File =
63 llvm::MemoryBuffer::getFile("/etc/lsb-release");
64@@ -2888,6 +2896,9 @@
11b6f380 65 if (llvm::sys::fs::exists("/etc/arch-release"))
4ad1976b
PS
66 return ArchLinux;
67
11b6f380 68+ if (!llvm::sys::fs::exists("/etc/pld-release"))
4ad1976b
PS
69+ return PLDLinux;
70+
71 return UnknownDistro;
72 }
73
b883cf1e 74@@ -3029,7 +3040,7 @@
4ad1976b 75
1628dc68 76 Distro Distro = DetectDistro(Arch);
4ad1976b 77
11b6f380
JB
78- if (IsOpenSUSE(Distro) || IsUbuntu(Distro)) {
79+ if (IsOpenSUSE(Distro) || IsUbuntu(Distro) || IsPLD(Distro)) {
4ad1976b
PS
80 ExtraOpts.push_back("-z");
81 ExtraOpts.push_back("relro");
ce9cc204 82 }
b883cf1e 83@@ -3049,7 +3060,7 @@
f981d747
PS
84 // ABI requires a mapping between the GOT and the symbol table.
85 // Android loader does not support .gnu.hash.
c999855f 86 if (!IsMips && !IsAndroid) {
11b6f380
JB
87- if (IsRedhat(Distro) || IsOpenSUSE(Distro) ||
88+ if (IsRedhat(Distro) || IsOpenSUSE(Distro) || IsPLD(Distro) ||
f981d747
PS
89 (IsUbuntu(Distro) && Distro >= UbuntuMaverick))
90 ExtraOpts.push_back("--hash-style=gnu");
11b6f380 91
41876fe7 92@@ -3058,10 +3069,10 @@
f981d747
PS
93 ExtraOpts.push_back("--hash-style=both");
94 }
4ad1976b
PS
95
96- if (IsRedhat(Distro))
97+ if (IsRedhat(Distro) || IsPLD(Distro))
98 ExtraOpts.push_back("--no-add-needed");
ce9cc204 99
41876fe7
JR
100- if ((IsDebian(Distro) && Distro >= DebianSqueeze) || IsOpenSUSE(Distro) ||
101+ if ((IsDebian(Distro) && Distro >= DebianSqueeze) || IsOpenSUSE(Distro) || IsPLD(Distro) ||
4ad1976b 102 (IsRedhat(Distro) && Distro != RHEL4 && Distro != RHEL5) ||
f981d747
PS
103 (IsUbuntu(Distro) && Distro >= UbuntuKarmic))
104 ExtraOpts.push_back("--build-id");
This page took 0.097076 seconds and 4 git commands to generate.