]> git.pld-linux.org Git - packages/llvm.git/blob - llvm-pld.patch
- release 3
[packages/llvm.git] / llvm-pld.patch
1 --- llvm-5.0.0.src.orig/tools/clang/lib/Driver/ToolChains/Gnu.cpp       2016-08-18 19:56:48.000000000 +0200
2 +++ llvm-5.0.0.src/tools/clang/lib/Driver/ToolChains/Gnu.cpp    2016-11-03 12:18:35.000000000 +0100
3 @@ -1498,6 +1498,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 --- llvm-5.0.0.src/tools/clang/include/clang/Driver/Distro.h.orig       2017-05-04 14:46:38.000000000 +0200
46 +++ llvm-5.0.0.src/tools/clang/include/clang/Driver/Distro.h    2017-12-01 22:44:57.785429043 +0100
47 @@ -27,6 +27,7 @@
48      // in this enum, because some tests are done by integer comparison against
49      // the first and last known member in the family, e.g. IsRedHat().
50      ArchLinux,
51 +    PLDLinux,
52      DebianLenny,
53      DebianSqueeze,
54      DebianWheezy,
55 @@ -114,6 +115,10 @@
56      return DistroVal >= UbuntuHardy && DistroVal <= UbuntuArtful;
57    }
58  
59 +  bool IsPLD() {
60 +    return DistroVal == PLDLinux;
61 +  }
62 +
63    /// @}
64  };
65  
66 --- llvm-5.0.0.src/tools/clang/lib/Driver/Distro.cpp.orig       2017-05-04 14:46:38.000000000 +0200
67 +++ llvm-5.0.0.src/tools/clang/lib/Driver/Distro.cpp    2017-12-01 22:47:15.155427475 +0100
68 @@ -129,6 +129,9 @@
69    if (VFS.exists("/etc/arch-release"))
70      return Distro::ArchLinux;
71  
72 +  if (VFS.exists("/etc/pld-release"))
73 +    return Distro::PLDLinux;
74 +
75    return Distro::UnknownDistro;
76  }
77  
78 --- llvm-5.0.0.src/tools/clang/lib/Driver/ToolChains/Linux.cpp.orig     2017-12-01 22:14:03.462116884 +0100
79 +++ llvm-5.0.0.src/tools/clang/lib/Driver/ToolChains/Linux.cpp  2017-12-01 22:51:38.678757801 +0100
80 @@ -210,7 +210,7 @@
81  
82    Distro Distro(D.getVFS());
83  
84 -  if (Distro.IsOpenSUSE() || Distro.IsUbuntu() || Distro.IsAlpineLinux()) {
85 +  if (Distro.IsOpenSUSE() || Distro.IsUbuntu() || Distro.IsAlpineLinux() || Distro.IsPLD()) {
86      ExtraOpts.push_back("-z");
87      ExtraOpts.push_back("relro");
88    }
89 @@ -232,7 +232,7 @@
90    // Android loader does not support .gnu.hash.
91    // Hexagon linker/loader does not support .gnu.hash
92    if (!IsMips && !IsAndroid && !IsHexagon) {
93 -    if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsAlpineLinux() ||
94 +    if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsAlpineLinux() || Distro.IsPLD() ||
95          (Distro.IsUbuntu() && Distro >= Distro::UbuntuMaverick))
96        ExtraOpts.push_back("--hash-style=gnu");
97  
98 @@ -241,7 +241,7 @@
99        ExtraOpts.push_back("--hash-style=both");
100    }
101  
102 -  if (Distro.IsRedhat() && Distro != Distro::RHEL5 && Distro != Distro::RHEL6)
103 +  if ((Distro.IsRedhat() && Distro != Distro::RHEL5 && Distro != Distro::RHEL6) || Distro.IsPLD())
104      ExtraOpts.push_back("--no-add-needed");
105  
106  #ifdef ENABLE_LINKER_BUILD_ID
This page took 0.165578 seconds and 3 git commands to generate.