]> git.pld-linux.org Git - packages/llvm.git/blob - llvm-pld.patch
01087c9dece9662566536024e39a1a6b581ce1da
[packages/llvm.git] / llvm-pld.patch
1 --- llvm-4.0.1.src/tools/clang/lib/Driver/ToolChains.cpp.orig   2017-05-31 12:01:14.000000000 +0200
2 +++ llvm-4.0.1.src/tools/clang/lib/Driver/ToolChains.cpp        2017-12-10 08:33:21.873800345 +0100
3 @@ -1549,6 +1549,7 @@
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",
9        "x86_64-pc-linux-gnu",    "x86_64-redhat-linux6E",
10        "x86_64-redhat-linux",    "x86_64-suse-linux",
11 @@ -1558,6 +1559,7 @@
12    static const char *const X32LibDirs[] = {"/libx32"};
13    static const char *const X86LibDirs[] = {"/lib32", "/lib"};
14    static const char *const X86Triples[] = {
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",
19 @@ -1591,6 +1593,7 @@
20  
21    static const char *const PPCLibDirs[] = {"/lib32", "/lib"};
22    static const char *const PPCTriples[] = {
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"};
27 @@ -1603,14 +1606,14 @@
28        "powerpc64le-suse-linux", "ppc64le-redhat-linux"};
29  
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"};
38  
39    static const char *const SystemZLibDirs[] = {"/lib64", "/lib"};
40 -  static const char *const SystemZTriples[] = {
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"};
44  
45 @@ -4112,7 +4115,7 @@
46  
47    Distro Distro(D.getVFS());
48  
49 -  if (Distro.IsOpenSUSE() || Distro.IsUbuntu()) {
50 +  if (Distro.IsOpenSUSE() || Distro.IsUbuntu() || Distro.IsPLD()) {
51      ExtraOpts.push_back("-z");
52      ExtraOpts.push_back("relro");
53    }
54 @@ -4132,7 +4135,7 @@
55    // ABI requires a mapping between the GOT and the symbol table.
56    // Android loader does not support .gnu.hash.
57    if (!IsMips && !IsAndroid) {
58 -    if (Distro.IsRedhat() || Distro.IsOpenSUSE() ||
59 +    if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsPLD() ||
60          (Distro.IsUbuntu() && Distro >= Distro::UbuntuMaverick))
61        ExtraOpts.push_back("--hash-style=gnu");
62  
63 @@ -4141,7 +4144,7 @@
64        ExtraOpts.push_back("--hash-style=both");
65    }
66  
67 -  if (Distro.IsRedhat() && Distro != Distro::RHEL5 && Distro != Distro::RHEL6)
68 +  if ((Distro.IsRedhat() && Distro != Distro::RHEL5 && Distro != Distro::RHEL6) || Distro.IsPLD())
69      ExtraOpts.push_back("--no-add-needed");
70  
71  #ifdef ENABLE_LINKER_BUILD_ID
72 --- llvm-4.0.1.src/tools/clang/include/clang/Driver/Distro.h.orig       2016-11-28 22:11:14.000000000 +0100
73 +++ llvm-4.0.1.src/tools/clang/include/clang/Driver/Distro.h    2017-12-10 08:31:15.017135111 +0100
74 @@ -27,6 +27,7 @@
75      // in this enum, because some tests are done by integer comparison against
76      // the first and last known member in the family, e.g. IsRedHat().
77      ArchLinux,
78 +    PLDLinux,
79      DebianLenny,
80      DebianSqueeze,
81      DebianWheezy,
82 @@ -112,7 +113,11 @@
83    bool IsUbuntu() const {
84      return DistroVal >= UbuntuHardy && DistroVal <= UbuntuZesty;
85    }
86
87 +
88 +  bool IsPLD() const {
89 +    return DistroVal == PLDLinux;
90 +  }
91 +
92    /// @}
93  };
94  
95 --- llvm-4.0.1.src/tools/clang/lib/Driver/Distro.cpp.orig       2016-11-28 22:11:18.000000000 +0100
96 +++ llvm-4.0.1.src/tools/clang/lib/Driver/Distro.cpp    2017-12-10 08:32:15.883801082 +0100
97 @@ -128,6 +128,9 @@
98    if (VFS.exists("/etc/arch-release"))
99      return Distro::ArchLinux;
100  
101 +  if (VFS.exists("/etc/pld-release"))
102 +    return Distro::PLDLinux;
103 +
104    return Distro::UnknownDistro;
105  }
106  
This page took 0.032858 seconds and 3 git commands to generate.