]> git.pld-linux.org Git - packages/llvm.git/blame - llvm-pld.patch
disable memory profiling runtime on x32
[packages/llvm.git] / llvm-pld.patch
CommitLineData
4d2642a0
JR
1diff -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
2--- llvm-11.0.1.src.org/tools/clang/include/clang/Driver/Distro.h 2020-12-18 20:57:38.000000000 +0100
3+++ llvm-11.0.1.src/tools/clang/include/clang/Driver/Distro.h 2021-03-25 22:27:39.173689051 +0100
4@@ -28,6 +28,7 @@ public:
5 // the first and last known member in the family, e.g. IsRedHat().
6 AlpineLinux,
7 ArchLinux,
8+ PLDLinux,
9 DebianLenny,
10 DebianSqueeze,
11 DebianWheezy,
12@@ -132,6 +133,10 @@ public:
40bef2a3
JP
13
14 bool IsGentoo() const { return DistroVal == Gentoo; }
4d2642a0
JR
15
16+ bool IsPLD() {
17+ return DistroVal == PLDLinux;
18+ }
19+
20 /// @}
21 };
22
23diff -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
24--- llvm-11.0.1.src.org/tools/clang/lib/Driver/Distro.cpp 2020-12-18 20:57:38.000000000 +0100
25+++ llvm-11.0.1.src/tools/clang/lib/Driver/Distro.cpp 2021-03-25 22:27:39.173689051 +0100
26@@ -165,6 +165,9 @@ static Distro::DistroType DetectDistro(l
27 if (VFS.exists("/etc/gentoo-release"))
28 return Distro::Gentoo;
29
30+ if (VFS.exists("/etc/pld-release"))
31+ return Distro::PLDLinux;
32+
33 return Distro::UnknownDistro;
34 }
35
36diff -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
37--- llvm-11.0.1.src.org/tools/clang/lib/Driver/ToolChains/Gnu.cpp 2020-12-18 20:57:38.000000000 +0100
38+++ llvm-11.0.1.src/tools/clang/lib/Driver/ToolChains/Gnu.cpp 2021-03-25 22:27:39.173689051 +0100
39@@ -2048,6 +2048,7 @@ void Generic_GCC::GCCInstallationDetecto
90b20139 40 // lists should shrink over time. Please don't add more elements to *Triples.
6d245802
JP
41 static const char *const AArch64LibDirs[] = {"/lib64", "/lib"};
42 static const char *const AArch64Triples[] = {
43+ "aarch64-pld-linux",
44 "aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-redhat-linux",
90b20139 45 "aarch64-suse-linux"};
6d245802 46 static const char *const AArch64beLibDirs[] = {"/lib"};
90b20139 47@@ -2055,8 +2056,13 @@ void Generic_GCC::GCCInstallationDetecto
d92b4c2a
JP
48 "aarch64_be-linux-gnu"};
49
50 static const char *const ARMLibDirs[] = {"/lib"};
90b20139 51- static const char *const ARMTriples[] = {"arm-linux-gnueabi"};
d92b4c2a 52- static const char *const ARMHFTriples[] = {"arm-linux-gnueabihf",
90b20139
JP
53+ static const char *const ARMTriples[] = {"arm-pld-linux-gnueabi",
54+ "arm-linux-gnueabi"};
d92b4c2a
JP
55+ static const char *const ARMHFTriples[] = {"arm-pld-linux-gnueabihf",
56+ "armv6hl-pld-linux-gnueabi",
57+ "armv7hl-pld-linux-gnueabi",
54102cba 58+ "armv7hnl-pld-linux-gnueabi",
d92b4c2a
JP
59+ "arm-linux-gnueabihf",
60 "armv7hl-redhat-linux-gnueabi",
61 "armv6hl-suse-linux-gnueabi",
62 "armv7hl-suse-linux-gnueabi"};
4d2642a0 63@@ -2072,6 +2077,7 @@ void Generic_GCC::GCCInstallationDetecto
f981d747 64
41876fe7 65 static const char *const X86_64LibDirs[] = {"/lib64", "/lib"};
f981d747 66 static const char *const X86_64Triples[] = {
41876fe7
JR
67+ "x86_64-pld-linux", "amd64-pld-linux",
68 "x86_64-linux-gnu", "x86_64-unknown-linux-gnu",
69 "x86_64-pc-linux-gnu", "x86_64-redhat-linux6E",
70 "x86_64-redhat-linux", "x86_64-suse-linux",
4d2642a0 71@@ -2081,6 +2087,7 @@ void Generic_GCC::GCCInstallationDetecto
8d52ede4 72 static const char *const X32LibDirs[] = {"/libx32", "/lib"};
41876fe7 73 static const char *const X86LibDirs[] = {"/lib32", "/lib"};
f981d747 74 static const char *const X86Triples[] = {
41876fe7 75+ "i686-pld-linux", "i586-pld-linux", "i486-pld-linux", "i386-pld-linux", "athlon-pld-linux",
90b20139
JP
76 "i586-linux-gnu", "i686-linux-gnu", "i686-pc-linux-gnu",
77 "i386-redhat-linux6E", "i686-redhat-linux", "i386-redhat-linux",
78 "i586-suse-linux", "i686-montavista-linux", "i686-gnu",
4d2642a0 79@@ -2121,6 +2128,7 @@ void Generic_GCC::GCCInstallationDetecto
b883cf1e 80
41876fe7 81 static const char *const PPCLibDirs[] = {"/lib32", "/lib"};
b883cf1e 82 static const char *const PPCTriples[] = {
41876fe7
JR
83+ "powerpc-pld-linux",
84 "powerpc-linux-gnu", "powerpc-unknown-linux-gnu", "powerpc-linux-gnuspe",
6d245802
JP
85 // On 32-bit PowerPC systems running SUSE Linux, gcc is configured as a
86 // 64-bit compiler which defaults to "-m32", hence "powerpc64-suse-linux".
4d2642a0 87@@ -2146,14 +2154,14 @@ void Generic_GCC::GCCInstallationDetecto
90b20139 88 "riscv64-unknown-elf"};
b883cf1e 89
41876fe7
JR
90 static const char *const SPARCv8LibDirs[] = {"/lib32", "/lib"};
91- static const char *const SPARCv8Triples[] = {"sparc-linux-gnu",
92+ static const char *const SPARCv8Triples[] = {"sparc-pld-linux", "sparc-linux-gnu",
93 "sparcv8-linux-gnu"};
94 static const char *const SPARCv9LibDirs[] = {"/lib64", "/lib"};
95- static const char *const SPARCv9Triples[] = {"sparc64-linux-gnu",
96+ static const char *const SPARCv9Triples[] = {"sparc64-pld-linux", "sparc64-linux-gnu",
97 "sparcv9-linux-gnu"};
b883cf1e 98
41876fe7 99 static const char *const SystemZLibDirs[] = {"/lib64", "/lib"};
b883cf1e 100- static const char *const SystemZTriples[] = {
41876fe7
JR
101+ static const char *const SystemZTriples[] = {"s390x-pld-linux",
102 "s390x-linux-gnu", "s390x-unknown-linux-gnu", "s390x-ibm-linux-gnu",
036156f1 103 "s390x-suse-linux", "s390x-redhat-linux"};
4ad1976b 104
4d2642a0
JR
105diff -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
106--- llvm-11.0.1.src.org/tools/clang/lib/Driver/ToolChains/Linux.cpp 2020-12-18 20:57:38.000000000 +0100
107+++ llvm-11.0.1.src/tools/clang/lib/Driver/ToolChains/Linux.cpp 2021-03-25 22:27:39.173689051 +0100
108@@ -226,7 +226,7 @@ Linux::Linux(const Driver &D, const llvm
0bc9c5c9
JP
109 ExtraOpts.push_back("now");
110 }
265e167c 111
0bc9c5c9
JP
112- if (Distro.IsOpenSUSE() || Distro.IsUbuntu() || Distro.IsAlpineLinux() ||
113+ if (Distro.IsOpenSUSE() || Distro.IsUbuntu() || Distro.IsAlpineLinux() || Distro.IsPLD() ||
114 Triple.isAndroid()) {
265e167c
JB
115 ExtraOpts.push_back("-z");
116 ExtraOpts.push_back("relro");
4d2642a0 117@@ -266,7 +266,7 @@ Linux::Linux(const Driver &D, const llvm
0bc9c5c9 118 // Android loader does not support .gnu.hash until API 23.
265e167c 119 // Hexagon linker/loader does not support .gnu.hash
0bc9c5c9 120 if (!IsMips && !IsHexagon) {
23ae6496
JP
121- if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsAlpineLinux() ||
122+ if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsAlpineLinux() || Distro.IsPLD() ||
0bc9c5c9
JP
123 (Distro.IsUbuntu() && Distro >= Distro::UbuntuMaverick) ||
124 (IsAndroid && !Triple.isAndroidVersionLT(23)))
265e167c 125 ExtraOpts.push_back("--hash-style=gnu");
This page took 0.264189 seconds and 4 git commands to generate.