]> git.pld-linux.org Git - packages/llvm.git/blame - llvm-pld.patch
up to 11.0.0
[packages/llvm.git] / llvm-pld.patch
CommitLineData
265e167c
JB
1--- llvm-5.0.0.src.orig/tools/clang/lib/Driver/ToolChains/Gnu.cpp 2016-08-18 19:56:48.000000000 +0200
2+++ llvm-5.0.0.src/tools/clang/lib/Driver/ToolChains/Gnu.cpp 2016-11-03 12:18:35.000000000 +0100
6d245802
JP
3@@ -1996,6 +1996,7 @@
4 // lifetime or initialization issues.
5 static const char *const AArch64LibDirs[] = {"/lib64", "/lib"};
6 static const char *const AArch64Triples[] = {
7+ "aarch64-pld-linux",
8 "aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-redhat-linux",
9 "aarch64-suse-linux", "aarch64-linux-android"};
10 static const char *const AArch64beLibDirs[] = {"/lib"};
11@@ -2020,6 +2021,7 @@
f981d747 12
41876fe7 13 static const char *const X86_64LibDirs[] = {"/lib64", "/lib"};
f981d747 14 static const char *const X86_64Triples[] = {
41876fe7
JR
15+ "x86_64-pld-linux", "amd64-pld-linux",
16 "x86_64-linux-gnu", "x86_64-unknown-linux-gnu",
17 "x86_64-pc-linux-gnu", "x86_64-redhat-linux6E",
18 "x86_64-redhat-linux", "x86_64-suse-linux",
6d245802 19@@ -2029,6 +2031,7 @@
41876fe7
JR
20 static const char *const X32LibDirs[] = {"/libx32"};
21 static const char *const X86LibDirs[] = {"/lib32", "/lib"};
f981d747 22 static const char *const X86Triples[] = {
41876fe7
JR
23+ "i686-pld-linux", "i586-pld-linux", "i486-pld-linux", "i386-pld-linux", "athlon-pld-linux",
24 "i686-linux-gnu", "i686-pc-linux-gnu", "i486-linux-gnu",
25 "i386-linux-gnu", "i386-redhat-linux6E", "i686-redhat-linux",
26 "i586-redhat-linux", "i386-redhat-linux", "i586-suse-linux",
6d245802 27@@ -2069,6 +2072,7 @@
b883cf1e 28
41876fe7 29 static const char *const PPCLibDirs[] = {"/lib32", "/lib"};
b883cf1e 30 static const char *const PPCTriples[] = {
41876fe7
JR
31+ "powerpc-pld-linux",
32 "powerpc-linux-gnu", "powerpc-unknown-linux-gnu", "powerpc-linux-gnuspe",
6d245802
JP
33 // On 32-bit PowerPC systems running SUSE Linux, gcc is configured as a
34 // 64-bit compiler which defaults to "-m32", hence "powerpc64-suse-linux".
35@@ -2093,14 +2097,14 @@
36 "riscv64-suse-linux"};
b883cf1e 37
41876fe7
JR
38 static const char *const SPARCv8LibDirs[] = {"/lib32", "/lib"};
39- static const char *const SPARCv8Triples[] = {"sparc-linux-gnu",
40+ static const char *const SPARCv8Triples[] = {"sparc-pld-linux", "sparc-linux-gnu",
41 "sparcv8-linux-gnu"};
42 static const char *const SPARCv9LibDirs[] = {"/lib64", "/lib"};
43- static const char *const SPARCv9Triples[] = {"sparc64-linux-gnu",
44+ static const char *const SPARCv9Triples[] = {"sparc64-pld-linux", "sparc64-linux-gnu",
45 "sparcv9-linux-gnu"};
b883cf1e 46
41876fe7 47 static const char *const SystemZLibDirs[] = {"/lib64", "/lib"};
b883cf1e 48- static const char *const SystemZTriples[] = {
41876fe7
JR
49+ static const char *const SystemZTriples[] = {"s390x-pld-linux",
50 "s390x-linux-gnu", "s390x-unknown-linux-gnu", "s390x-ibm-linux-gnu",
036156f1 51 "s390x-suse-linux", "s390x-redhat-linux"};
4ad1976b 52
265e167c
JB
53--- llvm-5.0.0.src/tools/clang/include/clang/Driver/Distro.h.orig 2017-05-04 14:46:38.000000000 +0200
54+++ llvm-5.0.0.src/tools/clang/include/clang/Driver/Distro.h 2017-12-01 22:44:57.785429043 +0100
5013c7ea
JB
55@@ -27,6 +27,7 @@
56 // in this enum, because some tests are done by integer comparison against
57 // the first and last known member in the family, e.g. IsRedHat().
58 ArchLinux,
59+ PLDLinux,
60 DebianLenny,
61 DebianSqueeze,
62 DebianWheezy,
265e167c
JB
63@@ -114,6 +115,10 @@
64 return DistroVal >= UbuntuHardy && DistroVal <= UbuntuArtful;
5013c7ea 65 }
265e167c
JB
66
67+ bool IsPLD() {
5013c7ea
JB
68+ return DistroVal == PLDLinux;
69+ }
70+
71 /// @}
72 };
73
265e167c
JB
74--- llvm-5.0.0.src/tools/clang/lib/Driver/Distro.cpp.orig 2017-05-04 14:46:38.000000000 +0200
75+++ llvm-5.0.0.src/tools/clang/lib/Driver/Distro.cpp 2017-12-01 22:47:15.155427475 +0100
76@@ -129,6 +129,9 @@
5013c7ea
JB
77 if (VFS.exists("/etc/arch-release"))
78 return Distro::ArchLinux;
79
80+ if (VFS.exists("/etc/pld-release"))
81+ return Distro::PLDLinux;
82+
83 return Distro::UnknownDistro;
84 }
85
265e167c
JB
86--- llvm-5.0.0.src/tools/clang/lib/Driver/ToolChains/Linux.cpp.orig 2017-12-01 22:14:03.462116884 +0100
87+++ llvm-5.0.0.src/tools/clang/lib/Driver/ToolChains/Linux.cpp 2017-12-01 22:51:38.678757801 +0100
88@@ -210,7 +210,7 @@
0bc9c5c9
JP
89 ExtraOpts.push_back("now");
90 }
265e167c 91
0bc9c5c9
JP
92- if (Distro.IsOpenSUSE() || Distro.IsUbuntu() || Distro.IsAlpineLinux() ||
93+ if (Distro.IsOpenSUSE() || Distro.IsUbuntu() || Distro.IsAlpineLinux() || Distro.IsPLD() ||
94 Triple.isAndroid()) {
265e167c
JB
95 ExtraOpts.push_back("-z");
96 ExtraOpts.push_back("relro");
265e167c 97@@ -232,7 +232,7 @@
0bc9c5c9 98 // Android loader does not support .gnu.hash until API 23.
265e167c 99 // Hexagon linker/loader does not support .gnu.hash
0bc9c5c9 100 if (!IsMips && !IsHexagon) {
23ae6496
JP
101- if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsAlpineLinux() ||
102+ if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsAlpineLinux() || Distro.IsPLD() ||
0bc9c5c9
JP
103 (Distro.IsUbuntu() && Distro >= Distro::UbuntuMaverick) ||
104 (IsAndroid && !Triple.isAndroidVersionLT(23)))
265e167c 105 ExtraOpts.push_back("--hash-style=gnu");
This page took 0.062852 seconds and 4 git commands to generate.