]>
Commit | Line | Data |
---|---|---|
4d2642a0 JR |
1 | 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 |
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 | ||
23 | 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 | |
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 | ||
36 | 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 | |
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 | |
6d245802 JP |
40 | // lifetime or initialization issues. |
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", | |
45 | "aarch64-suse-linux", "aarch64-linux-android"}; | |
46 | static const char *const AArch64beLibDirs[] = {"/lib"}; | |
54102cba | 47 | @@ -2055,9 +2056,14 @@ void Generic_GCC::GCCInstallationDetecto |
d92b4c2a JP |
48 | "aarch64_be-linux-gnu"}; |
49 | ||
50 | static const char *const ARMLibDirs[] = {"/lib"}; | |
51 | - static const char *const ARMTriples[] = {"arm-linux-gnueabi", | |
52 | + static const char *const ARMTriples[] = {"arm-pld-linux-gnueabi", | |
53 | + "arm-linux-gnueabi", | |
54 | "arm-linux-androideabi"}; | |
55 | - static const char *const ARMHFTriples[] = {"arm-linux-gnueabihf", | |
56 | + static const char *const ARMHFTriples[] = {"arm-pld-linux-gnueabihf", | |
57 | + "armv6hl-pld-linux-gnueabi", | |
58 | + "armv7hl-pld-linux-gnueabi", | |
54102cba | 59 | + "armv7hnl-pld-linux-gnueabi", |
d92b4c2a JP |
60 | + "arm-linux-gnueabihf", |
61 | "armv7hl-redhat-linux-gnueabi", | |
62 | "armv6hl-suse-linux-gnueabi", | |
63 | "armv7hl-suse-linux-gnueabi"}; | |
4d2642a0 | 64 | @@ -2072,6 +2077,7 @@ void Generic_GCC::GCCInstallationDetecto |
f981d747 | 65 | |
41876fe7 | 66 | static const char *const X86_64LibDirs[] = {"/lib64", "/lib"}; |
f981d747 | 67 | static const char *const X86_64Triples[] = { |
41876fe7 JR |
68 | + "x86_64-pld-linux", "amd64-pld-linux", |
69 | "x86_64-linux-gnu", "x86_64-unknown-linux-gnu", | |
70 | "x86_64-pc-linux-gnu", "x86_64-redhat-linux6E", | |
71 | "x86_64-redhat-linux", "x86_64-suse-linux", | |
4d2642a0 | 72 | @@ -2081,6 +2087,7 @@ void Generic_GCC::GCCInstallationDetecto |
8d52ede4 | 73 | static const char *const X32LibDirs[] = {"/libx32", "/lib"}; |
41876fe7 | 74 | static const char *const X86LibDirs[] = {"/lib32", "/lib"}; |
f981d747 | 75 | static const char *const X86Triples[] = { |
41876fe7 | 76 | + "i686-pld-linux", "i586-pld-linux", "i486-pld-linux", "i386-pld-linux", "athlon-pld-linux", |
8d52ede4 JP |
77 | "i586-linux-gnu", "i686-linux-gnu", |
78 | "i686-pc-linux-gnu", "i386-redhat-linux6E", | |
79 | "i686-redhat-linux", "i386-redhat-linux", | |
4d2642a0 | 80 | @@ -2121,6 +2128,7 @@ void Generic_GCC::GCCInstallationDetecto |
b883cf1e | 81 | |
41876fe7 | 82 | static const char *const PPCLibDirs[] = {"/lib32", "/lib"}; |
b883cf1e | 83 | static const char *const PPCTriples[] = { |
41876fe7 JR |
84 | + "powerpc-pld-linux", |
85 | "powerpc-linux-gnu", "powerpc-unknown-linux-gnu", "powerpc-linux-gnuspe", | |
6d245802 JP |
86 | // On 32-bit PowerPC systems running SUSE Linux, gcc is configured as a |
87 | // 64-bit compiler which defaults to "-m32", hence "powerpc64-suse-linux". | |
4d2642a0 | 88 | @@ -2146,14 +2154,14 @@ void Generic_GCC::GCCInstallationDetecto |
6d245802 | 89 | "riscv64-suse-linux"}; |
b883cf1e | 90 | |
41876fe7 JR |
91 | static const char *const SPARCv8LibDirs[] = {"/lib32", "/lib"}; |
92 | - static const char *const SPARCv8Triples[] = {"sparc-linux-gnu", | |
93 | + static const char *const SPARCv8Triples[] = {"sparc-pld-linux", "sparc-linux-gnu", | |
94 | "sparcv8-linux-gnu"}; | |
95 | static const char *const SPARCv9LibDirs[] = {"/lib64", "/lib"}; | |
96 | - static const char *const SPARCv9Triples[] = {"sparc64-linux-gnu", | |
97 | + static const char *const SPARCv9Triples[] = {"sparc64-pld-linux", "sparc64-linux-gnu", | |
98 | "sparcv9-linux-gnu"}; | |
b883cf1e | 99 | |
41876fe7 | 100 | static const char *const SystemZLibDirs[] = {"/lib64", "/lib"}; |
b883cf1e | 101 | - static const char *const SystemZTriples[] = { |
41876fe7 JR |
102 | + static const char *const SystemZTriples[] = {"s390x-pld-linux", |
103 | "s390x-linux-gnu", "s390x-unknown-linux-gnu", "s390x-ibm-linux-gnu", | |
036156f1 | 104 | "s390x-suse-linux", "s390x-redhat-linux"}; |
4ad1976b | 105 | |
4d2642a0 JR |
106 | 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 |
107 | --- llvm-11.0.1.src.org/tools/clang/lib/Driver/ToolChains/Linux.cpp 2020-12-18 20:57:38.000000000 +0100 | |
108 | +++ llvm-11.0.1.src/tools/clang/lib/Driver/ToolChains/Linux.cpp 2021-03-25 22:27:39.173689051 +0100 | |
109 | @@ -226,7 +226,7 @@ Linux::Linux(const Driver &D, const llvm | |
0bc9c5c9 JP |
110 | ExtraOpts.push_back("now"); |
111 | } | |
265e167c | 112 | |
0bc9c5c9 JP |
113 | - if (Distro.IsOpenSUSE() || Distro.IsUbuntu() || Distro.IsAlpineLinux() || |
114 | + if (Distro.IsOpenSUSE() || Distro.IsUbuntu() || Distro.IsAlpineLinux() || Distro.IsPLD() || | |
115 | Triple.isAndroid()) { | |
265e167c JB |
116 | ExtraOpts.push_back("-z"); |
117 | ExtraOpts.push_back("relro"); | |
4d2642a0 | 118 | @@ -266,7 +266,7 @@ Linux::Linux(const Driver &D, const llvm |
0bc9c5c9 | 119 | // Android loader does not support .gnu.hash until API 23. |
265e167c | 120 | // Hexagon linker/loader does not support .gnu.hash |
0bc9c5c9 | 121 | if (!IsMips && !IsHexagon) { |
23ae6496 JP |
122 | - if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsAlpineLinux() || |
123 | + if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsAlpineLinux() || Distro.IsPLD() || | |
0bc9c5c9 JP |
124 | (Distro.IsUbuntu() && Distro >= Distro::UbuntuMaverick) || |
125 | (IsAndroid && !Triple.isAndroidVersionLT(23))) | |
265e167c | 126 | ExtraOpts.push_back("--hash-style=gnu"); |