X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=llvm-pld.patch;h=cd84f6ac7c5251b6c1728a0618ec87a4d5f46ece;hb=8d52ede4adea642c397c0a2a6d017de124ebb451;hp=759396796261a4bbc42ebc4e0c9a3e90b873142e;hpb=d1e2ca8d6be249cc310afdc5c2208027b6c9cd98;p=packages%2Fllvm.git diff --git a/llvm-pld.patch b/llvm-pld.patch index 7593967..cd84f6a 100644 --- a/llvm-pld.patch +++ b/llvm-pld.patch @@ -1,6 +1,67 @@ ---- 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 @@ +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, ++ PLDLinux, + DebianLenny, + DebianSqueeze, + DebianWheezy, +@@ -132,6 +133,10 @@ public: + + bool IsGentoo() const { return DistroVal == Gentoo; } + ++ bool IsPLD() { ++ return DistroVal == PLDLinux; ++ } ++ + /// @} + }; + +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/pld-release")) ++ return Distro::PLDLinux; ++ + return Distro::UnknownDistro; + } + +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 + // lifetime or initialization issues. + static const char *const AArch64LibDirs[] = {"/lib64", "/lib"}; + static const char *const AArch64Triples[] = { ++ "aarch64-pld-linux", + "aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-redhat-linux", + "aarch64-suse-linux", "aarch64-linux-android"}; + static const char *const AArch64beLibDirs[] = {"/lib"}; +@@ -2055,9 +2056,14 @@ void Generic_GCC::GCCInstallationDetecto + "aarch64_be-linux-gnu"}; + + static const char *const ARMLibDirs[] = {"/lib"}; +- static const char *const ARMTriples[] = {"arm-linux-gnueabi", ++ static const char *const ARMTriples[] = {"arm-pld-linux-gnueabi", ++ "arm-linux-gnueabi", + "arm-linux-androideabi"}; +- static const char *const ARMHFTriples[] = {"arm-linux-gnueabihf", ++ static const char *const ARMHFTriples[] = {"arm-pld-linux-gnueabihf", ++ "armv6hl-pld-linux-gnueabi", ++ "armv7hl-pld-linux-gnueabi", ++ "armv7hnl-pld-linux-gnueabi", ++ "arm-linux-gnueabihf", + "armv7hl-redhat-linux-gnueabi", + "armv6hl-suse-linux-gnueabi", + "armv7hl-suse-linux-gnueabi"}; +@@ -2072,6 +2077,7 @@ void Generic_GCC::GCCInstallationDetecto static const char *const X86_64LibDirs[] = {"/lib64", "/lib"}; static const char *const X86_64Triples[] = { @@ -8,24 +69,24 @@ "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"}; +@@ -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-pld-linux", "i586-pld-linux", "i486-pld-linux", "i386-pld-linux", "athlon-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", -@@ -1591,6 +1593,7 @@ + "i586-linux-gnu", "i686-linux-gnu", + "i686-pc-linux-gnu", "i386-redhat-linux6E", + "i686-redhat-linux", "i386-redhat-linux", +@@ -2121,6 +2128,7 @@ void Generic_GCC::GCCInstallationDetecto static const char *const PPCLibDirs[] = {"/lib32", "/lib"}; static const char *const PPCTriples[] = { + "powerpc-pld-linux", "powerpc-linux-gnu", "powerpc-unknown-linux-gnu", "powerpc-linux-gnuspe", - "powerpc-suse-linux", "powerpc-montavista-linuxspe"}; - static const char *const PPC64LibDirs[] = {"/lib64", "/lib"}; -@@ -1603,14 +1606,14 @@ - "powerpc64le-suse-linux", "ppc64le-redhat-linux"}; + // On 32-bit PowerPC systems running SUSE Linux, gcc is configured as a + // 64-bit compiler which defaults to "-m32", hence "powerpc64-suse-linux". +@@ -2146,14 +2154,14 @@ void Generic_GCC::GCCInstallationDetecto + "riscv64-suse-linux"}; static const char *const SPARCv8LibDirs[] = {"/lib32", "/lib"}; - static const char *const SPARCv8Triples[] = {"sparc-linux-gnu", @@ -42,42 +103,10 @@ "s390x-linux-gnu", "s390x-unknown-linux-gnu", "s390x-ibm-linux-gnu", "s390x-suse-linux", "s390x-redhat-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 - // the first and last known member in the family, e.g. IsRedHat(). - ArchLinux, -+ PLDLinux, - DebianLenny, - DebianSqueeze, - DebianWheezy, -@@ -114,6 +115,10 @@ - return DistroVal >= UbuntuHardy && DistroVal <= UbuntuArtful; - } - -+ bool IsPLD() { -+ return DistroVal == PLDLinux; -+ } -+ - /// @} - }; - ---- 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/pld-release")) -+ return Distro::PLDLinux; -+ - 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/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"); } @@ -86,7 +115,7 @@ Triple.isAndroid()) { ExtraOpts.push_back("-z"); ExtraOpts.push_back("relro"); -@@ -232,7 +232,7 @@ +@@ -266,7 +266,7 @@ Linux::Linux(const Driver &D, const llvm // Android loader does not support .gnu.hash until API 23. // Hexagon linker/loader does not support .gnu.hash if (!IsMips && !IsHexagon) {