X-Git-Url: https://git.tld-linux.org/?p=packages%2Fllvm.git;a=blobdiff_plain;f=llvm-tld.patch;fp=llvm-tld.patch;h=645d8cd21bc07e344423f60bc3a476ef6f8eb3e5;hp=fd7cbe39e8e3efa305ca1a45b6a25b507f32e8bd;hb=4491aa7644e7699e77ac2e0fb5d91dc09cae0a03;hpb=9444547a02350424e740b4ca65361b05fe0b2b7c diff --git a/llvm-tld.patch b/llvm-tld.patch index fd7cbe3..645d8cd 100644 --- a/llvm-tld.patch +++ b/llvm-tld.patch @@ -1,6 +1,5 @@ -diff -dur -x '*~' -x '*.orig' -x '*.rej' llvm-3.9.0.src.orig/tools/clang/lib/Driver/ToolChains.cpp llvm-3.9.0.src/tools/clang/lib/Driver/ToolChains.cpp ---- llvm-3.9.0.src.orig/tools/clang/lib/Driver/ToolChains.cpp 2016-08-18 19:56:48.000000000 +0200 -+++ llvm-3.9.0.src/tools/clang/lib/Driver/ToolChains.cpp 2016-11-03 12:18:35.000000000 +0100 +--- llvm-5.0.0.src.orig/tools/clang/lib/Driver/ToolChains/Gnu.cpp 2016-08-18 19:56:48.000000000 +0200 ++++ llvm-5.0.0.src/tools/clang/lib/Driver/ToolChains/Gnu.cpp 2016-11-03 12:18:35.000000000 +0100 @@ -1498,6 +1498,7 @@ static const char *const X86_64LibDirs[] = {"/lib64", "/lib"}; @@ -9,7 +8,7 @@ diff -dur -x '*~' -x '*.orig' -x '*.rej' llvm-3.9.0.src.orig/tools/clang/lib/Dri "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", -@@ -1507,6 +1508,7 @@ +@@ -1558,6 +1559,7 @@ static const char *const X32LibDirs[] = {"/libx32"}; static const char *const X86LibDirs[] = {"/lib32", "/lib"}; static const char *const X86Triples[] = { @@ -17,60 +16,65 @@ diff -dur -x '*~' -x '*.orig' -x '*.rej' llvm-3.9.0.src.orig/tools/clang/lib/Dri "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", - static const char *const PPC64LibDirs[] = {"/lib64", "/lib"}; -@@ -3716,6 +3719,7 @@ - // in this enum, because some tests are done by integer comparison against - // the first and last known member in the family, e.g. IsRedHat(). - ArchLinux, -+ TLDLinux, - DebianLenny, - DebianSqueeze, - DebianWheezy, -@@ -3761,6 +3765,10 @@ - return Distro >= UbuntuHardy && Distro <= UbuntuXenial; - } +--- llvm-5.0.0.src/tools/clang/include/clang/Driver/Distro.h.orig 2017-05-04 14:46:38.000000000 +0200 ++++ llvm-5.0.0.src/tools/clang/include/clang/Driver/Distro.h 2017-12-01 22:44:57.785429043 +0100 +@@ -27,6 +27,7 @@ + // in this enum, because some tests are done by integer comparison against + // the first and last known member in the family, e.g. IsRedHat(). + ArchLinux, ++ TLDLinux, + DebianLenny, + DebianSqueeze, + DebianWheezy, +@@ -114,6 +115,10 @@ + return DistroVal >= UbuntuHardy && DistroVal <= UbuntuArtful; + } -+static bool IsTLD(enum Distro Distro) { -+ return Distro == TLDLinux; -+} ++ bool IsTLD() { ++ return DistroVal == TLDLinux; ++ } + - static Distro DetectDistro(const Driver &D, llvm::Triple::ArchType Arch) { - llvm::ErrorOr> File = - llvm::MemoryBuffer::getFile("/etc/lsb-release"); -@@ -3837,6 +3845,9 @@ - if (D.getVFS().exists("/etc/arch-release")) - return ArchLinux; + /// @} + }; -+ if (!llvm::sys::fs::exists("/etc/tld-release")) -+ return TLDLinux; +--- llvm-5.0.0.src/tools/clang/lib/Driver/Distro.cpp.orig 2017-05-04 14:46:38.000000000 +0200 ++++ llvm-5.0.0.src/tools/clang/lib/Driver/Distro.cpp 2017-12-01 22:47:15.155427475 +0100 +@@ -129,6 +129,9 @@ + if (VFS.exists("/etc/arch-release")) + return Distro::ArchLinux; + ++ if (VFS.exists("/etc/tld-release")) ++ return Distro::TLDLinux; + - return UnknownDistro; + return Distro::UnknownDistro; } -@@ -4012,7 +4023,7 @@ - - Distro Distro = DetectDistro(D, Arch); +--- llvm-5.0.0.src/tools/clang/lib/Driver/ToolChains/Linux.cpp.orig 2017-12-01 22:14:03.462116884 +0100 ++++ llvm-5.0.0.src/tools/clang/lib/Driver/ToolChains/Linux.cpp 2017-12-01 22:51:38.678757801 +0100 +@@ -210,7 +210,7 @@ + ExtraOpts.push_back("now"); + } -- if (IsOpenSUSE(Distro) || IsUbuntu(Distro)) { -+ if (IsOpenSUSE(Distro) || IsUbuntu(Distro) || IsTLD(Distro)) { +- if (Distro.IsOpenSUSE() || Distro.IsUbuntu() || Distro.IsAlpineLinux() || ++ if (Distro.IsOpenSUSE() || Distro.IsUbuntu() || Distro.IsAlpineLinux() || Distro.IsTLD() || + Triple.isAndroid()) { ExtraOpts.push_back("-z"); ExtraOpts.push_back("relro"); - } -@@ -4032,7 +4043,7 @@ - // ABI requires a mapping between the GOT and the symbol table. - // Android loader does not support .gnu.hash. - if (!IsMips && !IsAndroid) { -- if (IsRedhat(Distro) || IsOpenSUSE(Distro) || -+ if (IsRedhat(Distro) || IsOpenSUSE(Distro) || IsTLD(Distro) || - (IsUbuntu(Distro) && Distro >= UbuntuMaverick)) +@@ -232,7 +232,7 @@ + // Android loader does not support .gnu.hash until API 23. + // Hexagon linker/loader does not support .gnu.hash + if (!IsMips && !IsHexagon) { +- if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsAlpineLinux() || ++ if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsAlpineLinux() || Distro.IsTLD() || + (Distro.IsUbuntu() && Distro >= Distro::UbuntuMaverick) || + (IsAndroid && !Triple.isAndroidVersionLT(23))) ExtraOpts.push_back("--hash-style=gnu"); - -@@ -4041,7 +4052,7 @@ +@@ -241,7 +241,7 @@ ExtraOpts.push_back("--hash-style=both"); } -- if (IsRedhat(Distro) && Distro != RHEL5 && Distro != RHEL6) -+ if ((IsRedhat(Distro) && Distro != RHEL5 && Distro != RHEL6) || IsTLD(Distro)) +- if (Distro.IsRedhat() && Distro != Distro::RHEL5 && Distro != Distro::RHEL6) ++ if ((Distro.IsRedhat() && Distro != Distro::RHEL5 && Distro != Distro::RHEL6) || Distro.IsTLD()) ExtraOpts.push_back("--no-add-needed"); #ifdef ENABLE_LINKER_BUILD_ID