]> git.pld-linux.org Git - packages/llvm.git/blame - llvm-pld.patch
add R: llvm-polly-devel to clang-devel
[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
3@@ -1498,6 +1498,7 @@
f981d747 4
41876fe7 5 static const char *const X86_64LibDirs[] = {"/lib64", "/lib"};
f981d747 6 static const char *const X86_64Triples[] = {
41876fe7
JR
7+ "x86_64-pld-linux", "amd64-pld-linux",
8 "x86_64-linux-gnu", "x86_64-unknown-linux-gnu",
9 "x86_64-pc-linux-gnu", "x86_64-redhat-linux6E",
10 "x86_64-redhat-linux", "x86_64-suse-linux",
5013c7ea 11@@ -1558,6 +1559,7 @@
41876fe7
JR
12 static const char *const X32LibDirs[] = {"/libx32"};
13 static const char *const X86LibDirs[] = {"/lib32", "/lib"};
f981d747 14 static const char *const X86Triples[] = {
41876fe7
JR
15+ "i686-pld-linux", "i586-pld-linux", "i486-pld-linux", "i386-pld-linux", "athlon-pld-linux",
16 "i686-linux-gnu", "i686-pc-linux-gnu", "i486-linux-gnu",
17 "i386-linux-gnu", "i386-redhat-linux6E", "i686-redhat-linux",
18 "i586-redhat-linux", "i386-redhat-linux", "i586-suse-linux",
5013c7ea 19@@ -1591,6 +1593,7 @@
b883cf1e 20
41876fe7 21 static const char *const PPCLibDirs[] = {"/lib32", "/lib"};
b883cf1e 22 static const char *const PPCTriples[] = {
41876fe7
JR
23+ "powerpc-pld-linux",
24 "powerpc-linux-gnu", "powerpc-unknown-linux-gnu", "powerpc-linux-gnuspe",
25 "powerpc-suse-linux", "powerpc-montavista-linuxspe"};
26 static const char *const PPC64LibDirs[] = {"/lib64", "/lib"};
5013c7ea 27@@ -1603,14 +1606,14 @@
036156f1 28 "powerpc64le-suse-linux", "ppc64le-redhat-linux"};
b883cf1e 29
41876fe7
JR
30 static const char *const SPARCv8LibDirs[] = {"/lib32", "/lib"};
31- static const char *const SPARCv8Triples[] = {"sparc-linux-gnu",
32+ static const char *const SPARCv8Triples[] = {"sparc-pld-linux", "sparc-linux-gnu",
33 "sparcv8-linux-gnu"};
34 static const char *const SPARCv9LibDirs[] = {"/lib64", "/lib"};
35- static const char *const SPARCv9Triples[] = {"sparc64-linux-gnu",
36+ static const char *const SPARCv9Triples[] = {"sparc64-pld-linux", "sparc64-linux-gnu",
37 "sparcv9-linux-gnu"};
b883cf1e 38
41876fe7 39 static const char *const SystemZLibDirs[] = {"/lib64", "/lib"};
b883cf1e 40- static const char *const SystemZTriples[] = {
41876fe7
JR
41+ static const char *const SystemZTriples[] = {"s390x-pld-linux",
42 "s390x-linux-gnu", "s390x-unknown-linux-gnu", "s390x-ibm-linux-gnu",
036156f1 43 "s390x-suse-linux", "s390x-redhat-linux"};
4ad1976b 44
265e167c
JB
45--- llvm-5.0.0.src/tools/clang/include/clang/Driver/Distro.h.orig 2017-05-04 14:46:38.000000000 +0200
46+++ llvm-5.0.0.src/tools/clang/include/clang/Driver/Distro.h 2017-12-01 22:44:57.785429043 +0100
5013c7ea
JB
47@@ -27,6 +27,7 @@
48 // in this enum, because some tests are done by integer comparison against
49 // the first and last known member in the family, e.g. IsRedHat().
50 ArchLinux,
51+ PLDLinux,
52 DebianLenny,
53 DebianSqueeze,
54 DebianWheezy,
265e167c
JB
55@@ -114,6 +115,10 @@
56 return DistroVal >= UbuntuHardy && DistroVal <= UbuntuArtful;
5013c7ea 57 }
265e167c
JB
58
59+ bool IsPLD() {
5013c7ea
JB
60+ return DistroVal == PLDLinux;
61+ }
62+
63 /// @}
64 };
65
265e167c
JB
66--- llvm-5.0.0.src/tools/clang/lib/Driver/Distro.cpp.orig 2017-05-04 14:46:38.000000000 +0200
67+++ llvm-5.0.0.src/tools/clang/lib/Driver/Distro.cpp 2017-12-01 22:47:15.155427475 +0100
68@@ -129,6 +129,9 @@
5013c7ea
JB
69 if (VFS.exists("/etc/arch-release"))
70 return Distro::ArchLinux;
71
72+ if (VFS.exists("/etc/pld-release"))
73+ return Distro::PLDLinux;
74+
75 return Distro::UnknownDistro;
76 }
77
265e167c
JB
78--- llvm-5.0.0.src/tools/clang/lib/Driver/ToolChains/Linux.cpp.orig 2017-12-01 22:14:03.462116884 +0100
79+++ llvm-5.0.0.src/tools/clang/lib/Driver/ToolChains/Linux.cpp 2017-12-01 22:51:38.678757801 +0100
80@@ -210,7 +210,7 @@
0bc9c5c9
JP
81 ExtraOpts.push_back("now");
82 }
265e167c 83
0bc9c5c9
JP
84- if (Distro.IsOpenSUSE() || Distro.IsUbuntu() || Distro.IsAlpineLinux() ||
85+ if (Distro.IsOpenSUSE() || Distro.IsUbuntu() || Distro.IsAlpineLinux() || Distro.IsPLD() ||
86 Triple.isAndroid()) {
265e167c
JB
87 ExtraOpts.push_back("-z");
88 ExtraOpts.push_back("relro");
265e167c 89@@ -232,7 +232,7 @@
0bc9c5c9 90 // Android loader does not support .gnu.hash until API 23.
265e167c 91 // Hexagon linker/loader does not support .gnu.hash
0bc9c5c9 92 if (!IsMips && !IsHexagon) {
23ae6496
JP
93- if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsAlpineLinux() ||
94+ if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsAlpineLinux() || Distro.IsPLD() ||
0bc9c5c9
JP
95 (Distro.IsUbuntu() && Distro >= Distro::UbuntuMaverick) ||
96 (IsAndroid && !Triple.isAndroidVersionLT(23)))
265e167c 97 ExtraOpts.push_back("--hash-style=gnu");
This page took 0.10545 seconds and 4 git commands to generate.