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
5 static const char *const X86_64LibDirs[] = {"/lib64", "/lib"};
6 static const char *const X86_64Triples[] = {
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",
12 static const char *const X32LibDirs[] = {"/libx32"};
13 static const char *const X86LibDirs[] = {"/lib32", "/lib"};
14 static const char *const X86Triples[] = {
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",
19 --- llvm-5.0.0.src/tools/clang/include/clang/Driver/Distro.h.orig 2017-05-04 14:46:38.000000000 +0200
20 +++ llvm-5.0.0.src/tools/clang/include/clang/Driver/Distro.h 2017-12-01 22:44:57.785429043 +0100
22 // in this enum, because some tests are done by integer comparison against
23 // the first and last known member in the family, e.g. IsRedHat().
30 return DistroVal >= UbuntuHardy && DistroVal <= UbuntuArtful;
34 + return DistroVal == TLDLinux;
40 --- llvm-5.0.0.src/tools/clang/lib/Driver/Distro.cpp.orig 2017-05-04 14:46:38.000000000 +0200
41 +++ llvm-5.0.0.src/tools/clang/lib/Driver/Distro.cpp 2017-12-01 22:47:15.155427475 +0100
43 if (VFS.exists("/etc/arch-release"))
44 return Distro::ArchLinux;
46 + if (VFS.exists("/etc/tld-release"))
47 + return Distro::TLDLinux;
49 return Distro::UnknownDistro;
52 --- llvm-5.0.0.src/tools/clang/lib/Driver/ToolChains/Linux.cpp.orig 2017-12-01 22:14:03.462116884 +0100
53 +++ llvm-5.0.0.src/tools/clang/lib/Driver/ToolChains/Linux.cpp 2017-12-01 22:51:38.678757801 +0100
55 ExtraOpts.push_back("now");
58 - if (Distro.IsOpenSUSE() || Distro.IsUbuntu() || Distro.IsAlpineLinux() ||
59 + if (Distro.IsOpenSUSE() || Distro.IsUbuntu() || Distro.IsAlpineLinux() || Distro.IsTLD() ||
61 ExtraOpts.push_back("-z");
62 ExtraOpts.push_back("relro");
64 // Android loader does not support .gnu.hash until API 23.
65 // Hexagon linker/loader does not support .gnu.hash
66 if (!IsMips && !IsHexagon) {
67 - if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsAlpineLinux() ||
68 + if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsAlpineLinux() || Distro.IsTLD() ||
69 (Distro.IsUbuntu() && Distro >= Distro::UbuntuMaverick) ||
70 (IsAndroid && !Triple.isAndroidVersionLT(23)))
71 ExtraOpts.push_back("--hash-style=gnu");
73 ExtraOpts.push_back("--hash-style=both");
76 - if (Distro.IsRedhat() && Distro != Distro::RHEL5 && Distro != Distro::RHEL6)
77 + if ((Distro.IsRedhat() && Distro != Distro::RHEL5 && Distro != Distro::RHEL6) || Distro.IsTLD())
78 ExtraOpts.push_back("--no-add-needed");
80 #ifdef ENABLE_LINKER_BUILD_ID