]> TLD Linux GIT Repositories - packages/llvm.git/blobdiff - llvm-tld.patch
- release 2
[packages/llvm.git] / llvm-tld.patch
index 38b54f6a857348612e7591d9e281b0d4017def9a..fb62e20c6bbaeb7068f672720c96c855088f1fc3 100644 (file)
@@ -1,69 +1,69 @@
---- llvm-3.2.src/tools/clang/lib/Driver/ToolChains.cpp.orig    2012-12-16 16:59:27.000000000 +0100
-+++ llvm-3.2.src/tools/clang/lib/Driver/ToolChains.cpp 2013-01-24 12:42:19.582377854 +0100
-@@ -1062,6 +1062,7 @@
+--- llvm-3.5.0.src/tools/clang/lib/Driver/ToolChains.cpp.orig  2014-10-01 21:07:02.242822402 +0200
++++ llvm-3.5.0.src/tools/clang/lib/Driver/ToolChains.cpp       2014-10-01 21:29:07.449433463 +0200
+@@ -1333,6 +1333,7 @@
  
    static const char *const X86_64LibDirs[] = { "/lib64", "/lib" };
    static const char *const X86_64Triples[] = {
-+    "x86_64-tld-linux",
-     "x86_64-linux-gnu",
-     "x86_64-unknown-linux-gnu",
-     "x86_64-pc-linux-gnu",
-@@ -1074,6 +1075,7 @@
-   };
++    "x86_64-pld-linux",
+     "x86_64-linux-gnu", "x86_64-unknown-linux-gnu", "x86_64-pc-linux-gnu",
+     "x86_64-redhat-linux6E", "x86_64-redhat-linux", "x86_64-suse-linux",
+     "x86_64-manbo-linux-gnu", "x86_64-linux-gnu", "x86_64-slackware-linux",
+@@ -1341,6 +1342,7 @@
+   static const char *const X32LibDirs[] = { "/libx32" };
    static const char *const X86LibDirs[] = { "/lib32", "/lib" };
    static const char *const X86Triples[] = {
-+    "i686-tld-linux",
-     "i686-linux-gnu",
-     "i686-pc-linux-gnu",
-     "i486-linux-gnu",
-@@ -1830,6 +1834,7 @@
++    "i686-pld-linux",
+     "i686-linux-gnu", "i686-pc-linux-gnu", "i486-linux-gnu", "i386-linux-gnu",
+     "i386-redhat-linux6E", "i686-redhat-linux", "i586-redhat-linux",
+     "i386-redhat-linux", "i586-suse-linux", "i486-slackware-linux",
+@@ -2778,6 +2781,7 @@
  
- enum LinuxDistro {
+ enum Distro {
    ArchLinux,
 +  TLDLinux,
    DebianLenny,
    DebianSqueeze,
    DebianWheezy,
-@@ -1877,6 +1882,10 @@
-   return Distro >= UbuntuHardy && Distro <= UbuntuRaring;
+@@ -2820,6 +2824,10 @@
+   return Distro >= UbuntuHardy && Distro <= UbuntuTrusty;
  }
  
-+static bool IsTLD(enum LinuxDistro Distro) {
++static bool IsTLD(enum Distro Distro) {
 +  return Distro == TLDLinux;
 +}
 +
- static LinuxDistro DetectLinuxDistro(llvm::Triple::ArchType Arch) {
-   OwningPtr<llvm::MemoryBuffer> File;
-   if (!llvm::MemoryBuffer::getFile("/etc/lsb-release", File)) {
-@@ -1955,6 +1964,9 @@
-   if (!llvm::sys::fs::exists("/etc/arch-release", Exists) && Exists)
+ static Distro DetectDistro(llvm::Triple::ArchType Arch) {
+   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> File =
+       llvm::MemoryBuffer::getFile("/etc/lsb-release");
+@@ -2888,6 +2896,9 @@
+   if (llvm::sys::fs::exists("/etc/arch-release"))
      return ArchLinux;
  
-+  if (!llvm::sys::fs::exists("/etc/tld-release", Exists) && Exists)
++  if (!llvm::sys::fs::exists("/etc/tld-release"))
 +    return TLDLinux;
 +
    return UnknownDistro;
  }
  
-@@ -2072,7 +2084,7 @@
+@@ -3029,7 +3040,7 @@
  
-   LinuxDistro Distro = DetectLinuxDistro(Arch);
+   Distro Distro = DetectDistro(Arch);
  
--  if (IsOpenSuse(Distro) || IsUbuntu(Distro)) {
-+  if (IsOpenSuse(Distro) || IsUbuntu(Distro) || IsTLD(Distro)) {
+-  if (IsOpenSUSE(Distro) || IsUbuntu(Distro)) {
++  if (IsOpenSUSE(Distro) || IsUbuntu(Distro) || IsTLD(Distro)) {
      ExtraOpts.push_back("-z");
      ExtraOpts.push_back("relro");
    }
-@@ -2088,7 +2100,7 @@
+@@ -3049,7 +3060,7 @@
    // ABI requires a mapping between the GOT and the symbol table.
    // Android loader does not support .gnu.hash.
-   if (!isMipsArch(Arch) && !IsAndroid) {
--    if (IsRedhat(Distro) || IsOpenSuse(Distro) ||
-+    if (IsRedhat(Distro) || IsOpenSuse(Distro) || IsTLD(Distro) ||
+   if (!IsMips && !IsAndroid) {
+-    if (IsRedhat(Distro) || IsOpenSUSE(Distro) ||
++    if (IsRedhat(Distro) || IsOpenSUSE(Distro) || IsTLD(Distro) ||
          (IsUbuntu(Distro) && Distro >= UbuntuMaverick))
        ExtraOpts.push_back("--hash-style=gnu");
  
-@@ -2097,11 +2109,11 @@
+@@ -3058,11 +3069,11 @@
        ExtraOpts.push_back("--hash-style=both");
    }
  
@@ -72,8 +72,8 @@
      ExtraOpts.push_back("--no-add-needed");
  
    if (Distro == DebianSqueeze || Distro == DebianWheezy ||
--      IsOpenSuse(Distro) ||
-+      IsOpenSuse(Distro) || IsTLD(Distro) ||
+-      Distro == DebianJessie || IsOpenSUSE(Distro) ||
++      Distro == DebianJessie || IsOpenSUSE(Distro) || IsTLD(Distro) ||
        (IsRedhat(Distro) && Distro != RHEL4 && Distro != RHEL5) ||
        (IsUbuntu(Distro) && Distro >= UbuntuKarmic))
      ExtraOpts.push_back("--build-id");