]>
Commit | Line | Data |
---|---|---|
5013c7ea JB |
1 | --- llvm-4.0.1.src/tools/clang/lib/Driver/ToolChains.cpp.orig 2017-05-31 12:01:14.000000000 +0200 |
2 | +++ llvm-4.0.1.src/tools/clang/lib/Driver/ToolChains.cpp 2017-12-10 08:33:21.873800345 +0100 | |
3 | @@ -1549,6 +1549,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 | |
5013c7ea | 45 | @@ -4112,7 +4115,7 @@ |
4ad1976b | 46 | |
5013c7ea | 47 | Distro Distro(D.getVFS()); |
4ad1976b | 48 | |
5013c7ea JB |
49 | - if (Distro.IsOpenSUSE() || Distro.IsUbuntu()) { |
50 | + if (Distro.IsOpenSUSE() || Distro.IsUbuntu() || Distro.IsPLD()) { | |
4ad1976b PS |
51 | ExtraOpts.push_back("-z"); |
52 | ExtraOpts.push_back("relro"); | |
ce9cc204 | 53 | } |
5013c7ea | 54 | @@ -4132,7 +4135,7 @@ |
f981d747 PS |
55 | // ABI requires a mapping between the GOT and the symbol table. |
56 | // Android loader does not support .gnu.hash. | |
c999855f | 57 | if (!IsMips && !IsAndroid) { |
5013c7ea JB |
58 | - if (Distro.IsRedhat() || Distro.IsOpenSUSE() || |
59 | + if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsPLD() || | |
60 | (Distro.IsUbuntu() && Distro >= Distro::UbuntuMaverick)) | |
f981d747 | 61 | ExtraOpts.push_back("--hash-style=gnu"); |
11b6f380 | 62 | |
5013c7ea | 63 | @@ -4141,7 +4144,7 @@ |
f981d747 PS |
64 | ExtraOpts.push_back("--hash-style=both"); |
65 | } | |
4ad1976b | 66 | |
5013c7ea JB |
67 | - if (Distro.IsRedhat() && Distro != Distro::RHEL5 && Distro != Distro::RHEL6) |
68 | + if ((Distro.IsRedhat() && Distro != Distro::RHEL5 && Distro != Distro::RHEL6) || Distro.IsPLD()) | |
4ad1976b | 69 | ExtraOpts.push_back("--no-add-needed"); |
ce9cc204 | 70 | |
036156f1 | 71 | #ifdef ENABLE_LINKER_BUILD_ID |
5013c7ea JB |
72 | --- llvm-4.0.1.src/tools/clang/include/clang/Driver/Distro.h.orig 2016-11-28 22:11:14.000000000 +0100 |
73 | +++ llvm-4.0.1.src/tools/clang/include/clang/Driver/Distro.h 2017-12-10 08:31:15.017135111 +0100 | |
74 | @@ -27,6 +27,7 @@ | |
75 | // in this enum, because some tests are done by integer comparison against | |
76 | // the first and last known member in the family, e.g. IsRedHat(). | |
77 | ArchLinux, | |
78 | + PLDLinux, | |
79 | DebianLenny, | |
80 | DebianSqueeze, | |
81 | DebianWheezy, | |
82 | @@ -112,7 +113,11 @@ | |
83 | bool IsUbuntu() const { | |
84 | return DistroVal >= UbuntuHardy && DistroVal <= UbuntuZesty; | |
85 | } | |
86 | - | |
87 | + | |
88 | + bool IsPLD() const { | |
89 | + return DistroVal == PLDLinux; | |
90 | + } | |
91 | + | |
92 | /// @} | |
93 | }; | |
94 | ||
95 | --- llvm-4.0.1.src/tools/clang/lib/Driver/Distro.cpp.orig 2016-11-28 22:11:18.000000000 +0100 | |
96 | +++ llvm-4.0.1.src/tools/clang/lib/Driver/Distro.cpp 2017-12-10 08:32:15.883801082 +0100 | |
97 | @@ -128,6 +128,9 @@ | |
98 | if (VFS.exists("/etc/arch-release")) | |
99 | return Distro::ArchLinux; | |
100 | ||
101 | + if (VFS.exists("/etc/pld-release")) | |
102 | + return Distro::PLDLinux; | |
103 | + | |
104 | return Distro::UnknownDistro; | |
105 | } | |
106 |