]> git.pld-linux.org Git - packages/llvm.git/blame - llvm-pld.patch
TODO added.
[packages/llvm.git] / llvm-pld.patch
CommitLineData
4ad1976b
PS
1--- llvm-3.0./tools/clang/lib/Driver/ToolChains.cpp.orig 2012-02-09 11:41:41.000000000 +0100
2+++ llvm-3.0./tools/clang/lib/Driver/ToolChains.cpp 2012-02-09 12:25:54.844008378 +0100
f981d747
PS
3@@ -1190,6 +1190,7 @@
4
5 static const char *const X86_64LibDirs[] = { "/lib64", "/lib" };
6 static const char *const X86_64Triples[] = {
7+ "x86_64-pld-linux",
8 "x86_64-linux-gnu",
9 "x86_64-unknown-linux-gnu",
10 "x86_64-pc-linux-gnu",
11@@ -1202,6 +1203,8 @@
12 };
13 static const char *const X86LibDirs[] = { "/lib32", "/lib" };
14 static const char *const X86Triples[] = {
15+ "i686-pld-linux",
16+ "i486-pld-linux",
17 "i686-linux-gnu",
18 "i686-pc-linux-gnu",
19 "i486-linux-gnu",
20@@ -1815,6 +1818,7 @@
4ad1976b
PS
21
22 enum LinuxDistro {
23 ArchLinux,
24+ PLDLinux,
25 DebianLenny,
26 DebianSqueeze,
27 DebianWheezy,
f981d747
PS
28@@ -1860,6 +1864,10 @@
29 return Distro >= UbuntuHardy && Distro <= UbuntuPrecise;
4ad1976b
PS
30 }
31
32+static bool IsPLD(enum LinuxDistro Distro) {
33+ return Distro == PLDLinux;
34+}
35+
36 static LinuxDistro DetectLinuxDistro(llvm::Triple::ArchType Arch) {
f981d747 37 OwningPtr<llvm::MemoryBuffer> File;
4ad1976b 38 if (!llvm::MemoryBuffer::getFile("/etc/lsb-release", File)) {
f981d747 39@@ -1936,6 +1944,9 @@
4ad1976b
PS
40 if (!llvm::sys::fs::exists("/etc/arch-release", Exists) && Exists)
41 return ArchLinux;
42
43+ if (!llvm::sys::fs::exists("/etc/pld-release", Exists) && Exists)
44+ return PLDLinux;
45+
46 return UnknownDistro;
47 }
48
f981d747 49@@ -2003,7 +2014,7 @@
4ad1976b
PS
50
51 LinuxDistro Distro = DetectLinuxDistro(Arch);
52
53- if (IsOpenSuse(Distro) || IsUbuntu(Distro)) {
54+ if (IsOpenSuse(Distro) || IsUbuntu(Distro) || IsPLD(Distro)) {
55 ExtraOpts.push_back("-z");
56 ExtraOpts.push_back("relro");
ce9cc204 57 }
f981d747
PS
58@@ -2024,7 +2035,7 @@
59 // ABI requires a mapping between the GOT and the symbol table.
60 // Android loader does not support .gnu.hash.
61 if (!IsMips && !IsAndroid) {
62- if (IsRedhat(Distro) || IsOpenSuse(Distro) ||
63+ if (IsRedhat(Distro) || IsOpenSuse(Distro) || IsPLD(Distro) ||
64 (IsUbuntu(Distro) && Distro >= UbuntuMaverick))
65 ExtraOpts.push_back("--hash-style=gnu");
4ad1976b 66
f981d747
PS
67@@ -2033,11 +2044,11 @@
68 ExtraOpts.push_back("--hash-style=both");
69 }
4ad1976b
PS
70
71- if (IsRedhat(Distro))
72+ if (IsRedhat(Distro) || IsPLD(Distro))
73 ExtraOpts.push_back("--no-add-needed");
ce9cc204 74
4ad1976b
PS
75 if (Distro == DebianSqueeze || Distro == DebianWheezy ||
76- IsOpenSuse(Distro) ||
77+ IsOpenSuse(Distro) || IsPLD(Distro) ||
78 (IsRedhat(Distro) && Distro != RHEL4 && Distro != RHEL5) ||
f981d747
PS
79 (IsUbuntu(Distro) && Distro >= UbuntuKarmic))
80 ExtraOpts.push_back("--build-id");
This page took 0.083962 seconds and 4 git commands to generate.