X-Git-Url: https://git.tld-linux.org/?p=packages%2Fllvm.git;a=blobdiff_plain;f=llvm-tld.patch;fp=llvm-tld.patch;h=9eb33c4665918709782b3adec63bb61e722ee8e7;hp=645d8cd21bc07e344423f60bc3a476ef6f8eb3e5;hb=9a942b15771786b61f66fd6011b30beab8f4eb8f;hpb=a9f5c8b2c627e29019650a6d45bb0abeeedad1d1 diff --git a/llvm-tld.patch b/llvm-tld.patch index 645d8cd..9eb33c4 100644 --- a/llvm-tld.patch +++ b/llvm-tld.patch @@ -1,34 +1,17 @@ ---- 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"}; - static const char *const X86_64Triples[] = { -+ "x86_64-tld-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", -@@ -1558,6 +1559,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", - "i386-linux-gnu", "i386-redhat-linux6E", "i686-redhat-linux", - "i586-redhat-linux", "i386-redhat-linux", "i586-suse-linux", ---- 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 +diff -urNp -x '*.orig' llvm-11.0.1.src.org/tools/clang/include/clang/Driver/Distro.h llvm-11.0.1.src/tools/clang/include/clang/Driver/Distro.h +--- llvm-11.0.1.src.org/tools/clang/include/clang/Driver/Distro.h 2020-12-18 20:57:38.000000000 +0100 ++++ llvm-11.0.1.src/tools/clang/include/clang/Driver/Distro.h 2021-03-25 22:27:39.173689051 +0100 +@@ -28,6 +28,7 @@ public: // the first and last known member in the family, e.g. IsRedHat(). + AlpineLinux, ArchLinux, + TLDLinux, DebianLenny, DebianSqueeze, DebianWheezy, -@@ -114,6 +115,10 @@ - return DistroVal >= UbuntuHardy && DistroVal <= UbuntuArtful; - } +@@ -132,6 +133,10 @@ public: + + bool IsGentoo() const { return DistroVal == Gentoo; } + bool IsTLD() { + return DistroVal == TLDLinux; @@ -37,11 +20,12 @@ /// @} }; ---- 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; +diff -urNp -x '*.orig' llvm-11.0.1.src.org/tools/clang/lib/Driver/Distro.cpp llvm-11.0.1.src/tools/clang/lib/Driver/Distro.cpp +--- llvm-11.0.1.src.org/tools/clang/lib/Driver/Distro.cpp 2020-12-18 20:57:38.000000000 +0100 ++++ llvm-11.0.1.src/tools/clang/lib/Driver/Distro.cpp 2021-03-25 22:27:39.173689051 +0100 +@@ -165,6 +165,9 @@ static Distro::DistroType DetectDistro(l + if (VFS.exists("/etc/gentoo-release")) + return Distro::Gentoo; + if (VFS.exists("/etc/tld-release")) + return Distro::TLDLinux; @@ -49,9 +33,37 @@ return Distro::UnknownDistro; } ---- 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 @@ +diff -urNp -x '*.orig' llvm-11.0.1.src.org/tools/clang/lib/Driver/ToolChains/Gnu.cpp llvm-11.0.1.src/tools/clang/lib/Driver/ToolChains/Gnu.cpp +--- llvm-11.0.1.src.org/tools/clang/lib/Driver/ToolChains/Gnu.cpp 2020-12-18 20:57:38.000000000 +0100 ++++ llvm-11.0.1.src/tools/clang/lib/Driver/ToolChains/Gnu.cpp 2021-03-25 22:27:39.173689051 +0100 +@@ -2048,6 +2048,7 @@ void Generic_GCC::GCCInstallationDetecto + // lists should shrink over time. Please don't add more elements to *Triples. + static const char *const AArch64LibDirs[] = {"/lib64", "/lib"}; + static const char *const AArch64Triples[] = { ++ "aarch64-tld-linux", + "aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-redhat-linux", + "aarch64-suse-linux"}; + static const char *const AArch64beLibDirs[] = {"/lib"}; +@@ -2072,6 +2077,7 @@ void Generic_GCC::GCCInstallationDetecto + + static const char *const X86_64LibDirs[] = {"/lib64", "/lib"}; + static const char *const X86_64Triples[] = { ++ "x86_64-tld-linux", "amd64-tld-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", +@@ -2081,6 +2087,7 @@ void Generic_GCC::GCCInstallationDetecto + static const char *const X32LibDirs[] = {"/libx32", "/lib"}; + static const char *const X86LibDirs[] = {"/lib32", "/lib"}; + static const char *const X86Triples[] = { ++ "i686-tld-linux", + "i586-linux-gnu", "i686-linux-gnu", "i686-pc-linux-gnu", + "i386-redhat-linux6E", "i686-redhat-linux", "i386-redhat-linux", + "i586-suse-linux", "i686-montavista-linux", "i686-gnu", +diff -urNp -x '*.orig' llvm-11.0.1.src.org/tools/clang/lib/Driver/ToolChains/Linux.cpp llvm-11.0.1.src/tools/clang/lib/Driver/ToolChains/Linux.cpp +--- llvm-11.0.1.src.org/tools/clang/lib/Driver/ToolChains/Linux.cpp 2020-12-18 20:57:38.000000000 +0100 ++++ llvm-11.0.1.src/tools/clang/lib/Driver/ToolChains/Linux.cpp 2021-03-25 22:27:39.173689051 +0100 +@@ -226,7 +226,7 @@ Linux::Linux(const Driver &D, const llvm ExtraOpts.push_back("now"); } @@ -60,21 +72,3 @@ Triple.isAndroid()) { ExtraOpts.push_back("-z"); ExtraOpts.push_back("relro"); -@@ -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"); -@@ -241,7 +241,7 @@ - ExtraOpts.push_back("--hash-style=both"); - } - -- 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