]> git.pld-linux.org Git - packages/llvm.git/blob - llvm-pld.patch
1b8418bc6b17bb71d5a8266c9902631cdd3ca790
[packages/llvm.git] / llvm-pld.patch
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 @@
4  
5    static const char *const X86_64LibDirs[] = { "/lib64", "/lib" };
6    static const char *const X86_64Triples[] = {
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"
11    };
12    static const char *const X86LibDirs[] = { "/lib32", "/lib" };
13    static const char *const X86Triples[] = {
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 @@
19  
20  enum Distro {
21    ArchLinux,
22 +  PLDLinux,
23    DebianLenny,
24    DebianSqueeze,
25    DebianWheezy,
26 @@ -2209,6 +2212,10 @@
27    return Distro >= UbuntuHardy && Distro <= UbuntuTrusty;
28  }
29  
30 +static bool IsPLD(enum Distro Distro) {
31 +  return Distro == PLDLinux;
32 +}
33 +
34  static Distro DetectDistro(llvm::Triple::ArchType Arch) {
35    OwningPtr<llvm::MemoryBuffer> File;
36    if (!llvm::MemoryBuffer::getFile("/etc/lsb-release", File)) {
37 @@ -2276,6 +2283,9 @@
38    if (llvm::sys::fs::exists("/etc/arch-release"))
39      return ArchLinux;
40  
41 +  if (!llvm::sys::fs::exists("/etc/pld-release"))
42 +    return PLDLinux;
43 +
44    return UnknownDistro;
45  }
46  
47 @@ -2382,7 +2392,7 @@
48  
49    Distro Distro = DetectDistro(Arch);
50  
51 -  if (IsOpenSUSE(Distro) || IsUbuntu(Distro)) {
52 +  if (IsOpenSUSE(Distro) || IsUbuntu(Distro) || IsPLD(Distro)) {
53      ExtraOpts.push_back("-z");
54      ExtraOpts.push_back("relro");
55    }
56 @@ -2402,7 +2412,7 @@
57    // ABI requires a mapping between the GOT and the symbol table.
58    // Android loader does not support .gnu.hash.
59    if (!IsMips && !IsAndroid) {
60 -    if (IsRedhat(Distro) || IsOpenSUSE(Distro) ||
61 +    if (IsRedhat(Distro) || IsOpenSUSE(Distro) || IsPLD(Distro) ||
62          (IsUbuntu(Distro) && Distro >= UbuntuMaverick))
63        ExtraOpts.push_back("--hash-style=gnu");
64  
65 @@ -2411,11 +2421,11 @@
66        ExtraOpts.push_back("--hash-style=both");
67    }
68  
69 -  if (IsRedhat(Distro))
70 +  if (IsRedhat(Distro) || IsPLD(Distro))
71      ExtraOpts.push_back("--no-add-needed");
72  
73    if (Distro == DebianSqueeze || Distro == DebianWheezy ||
74 -      Distro == DebianJessie || IsOpenSUSE(Distro) ||
75 +      Distro == DebianJessie || IsOpenSUSE(Distro) || IsPLD(Distro) ||
76        (IsRedhat(Distro) && Distro != RHEL4 && Distro != RHEL5) ||
77        (IsUbuntu(Distro) && Distro >= UbuntuKarmic))
78      ExtraOpts.push_back("--build-id");
This page took 0.061426 seconds and 3 git commands to generate.