]> TLD Linux GIT Repositories - packages/llvm.git/blob - llvm-tld.patch
- updated to 8.0.1
[packages/llvm.git] / llvm-tld.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-tld-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-tld-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 --- llvm-5.0.0.src/tools/clang/include/clang/Driver/Distro.h.orig       2017-05-04 14:46:38.000000000 +0200
20 +++ llvm-5.0.0.src/tools/clang/include/clang/Driver/Distro.h    2017-12-01 22:44:57.785429043 +0100
21 @@ -27,6 +27,7 @@
22      // in this enum, because some tests are done by integer comparison against
23      // the first and last known member in the family, e.g. IsRedHat().
24      ArchLinux,
25 +    TLDLinux,
26      DebianLenny,
27      DebianSqueeze,
28      DebianWheezy,
29 @@ -114,6 +115,10 @@
30      return DistroVal >= UbuntuHardy && DistroVal <= UbuntuArtful;
31    }
32  
33 +  bool IsTLD() {
34 +    return DistroVal == TLDLinux;
35 +  }
36 +
37    /// @}
38  };
39  
40 --- llvm-5.0.0.src/tools/clang/lib/Driver/Distro.cpp.orig       2017-05-04 14:46:38.000000000 +0200
41 +++ llvm-5.0.0.src/tools/clang/lib/Driver/Distro.cpp    2017-12-01 22:47:15.155427475 +0100
42 @@ -129,6 +129,9 @@
43    if (VFS.exists("/etc/arch-release"))
44      return Distro::ArchLinux;
45  
46 +  if (VFS.exists("/etc/tld-release"))
47 +    return Distro::TLDLinux;
48 +
49    return Distro::UnknownDistro;
50  }
51  
52 --- llvm-5.0.0.src/tools/clang/lib/Driver/ToolChains/Linux.cpp.orig     2017-12-01 22:14:03.462116884 +0100
53 +++ llvm-5.0.0.src/tools/clang/lib/Driver/ToolChains/Linux.cpp  2017-12-01 22:51:38.678757801 +0100
54 @@ -210,7 +210,7 @@
55      ExtraOpts.push_back("now");
56    }
57  
58 -  if (Distro.IsOpenSUSE() || Distro.IsUbuntu() || Distro.IsAlpineLinux() ||
59 +  if (Distro.IsOpenSUSE() || Distro.IsUbuntu() || Distro.IsAlpineLinux() || Distro.IsTLD() ||
60        Triple.isAndroid()) {
61      ExtraOpts.push_back("-z");
62      ExtraOpts.push_back("relro");
63 @@ -232,7 +232,7 @@
64    // Android loader does not support .gnu.hash until API 23.
65    // Hexagon linker/loader does not support .gnu.hash
66    if (!IsMips && !IsHexagon) {
67 -    if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsAlpineLinux() ||
68 +    if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsAlpineLinux() || Distro.IsTLD() ||
69          (Distro.IsUbuntu() && Distro >= Distro::UbuntuMaverick) ||
70          (IsAndroid && !Triple.isAndroidVersionLT(23)))
71        ExtraOpts.push_back("--hash-style=gnu");
72 @@ -241,7 +241,7 @@
73        ExtraOpts.push_back("--hash-style=both");
74    }
75  
76 -  if (Distro.IsRedhat() && Distro != Distro::RHEL5 && Distro != Distro::RHEL6)
77 +  if ((Distro.IsRedhat() && Distro != Distro::RHEL5 && Distro != Distro::RHEL6) || Distro.IsTLD())
78      ExtraOpts.push_back("--no-add-needed");
79  
80  #ifdef ENABLE_LINKER_BUILD_ID