diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-09-15 20:01:45 +0000 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-09-15 20:01:45 +0000 |
commit | 8642108eae6cbb08930c10a883407a7ec2b2be1f (patch) | |
tree | d07f274152fd85a060cb72bf31ac70951804a79d /user/clang/0001-Add-support-for-Ad-lie-Linux.patch | |
parent | de7967e51d8a8b525054bca4dd72dae1b32a48dd (diff) | |
download | packages-8642108eae6cbb08930c10a883407a7ec2b2be1f.tar.gz packages-8642108eae6cbb08930c10a883407a7ec2b2be1f.tar.bz2 packages-8642108eae6cbb08930c10a883407a7ec2b2be1f.tar.xz packages-8642108eae6cbb08930c10a883407a7ec2b2be1f.zip |
Bump LLVM and Clang to 6.0.1, move to user/
Diffstat (limited to 'user/clang/0001-Add-support-for-Ad-lie-Linux.patch')
-rw-r--r-- | user/clang/0001-Add-support-for-Ad-lie-Linux.patch | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/user/clang/0001-Add-support-for-Ad-lie-Linux.patch b/user/clang/0001-Add-support-for-Ad-lie-Linux.patch new file mode 100644 index 000000000..f12adf513 --- /dev/null +++ b/user/clang/0001-Add-support-for-Ad-lie-Linux.patch @@ -0,0 +1,78 @@ +From 085ba75b10376fa55bb94cb6fa6c54526957732f Mon Sep 17 00:00:00 2001 +From: "A. Wilcox" <AWilcox@Wilcox-Tech.com> +Date: Thu, 13 Sep 2018 11:42:28 -0500 +Subject: [PATCH] =?UTF-8?q?Add=20support=20for=20Ad=C3=A9lie=20Linux?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + include/clang/Driver/Distro.h | 5 +++++ + lib/Driver/Distro.cpp | 3 +++ + lib/Driver/ToolChains/Linux.cpp | 6 ++++-- + 3 files changed, 12 insertions(+), 2 deletions(-) + +diff --git a/include/clang/Driver/Distro.h b/include/clang/Driver/Distro.h +index 7b34a09256..7a3774a4f1 100644 +--- a/include/clang/Driver/Distro.h ++++ b/include/clang/Driver/Distro.h +@@ -26,6 +26,7 @@ public: + // NB: Releases of a particular Linux distro should be kept together + // in this enum, because some tests are done by integer comparison against + // the first and last known member in the family, e.g. IsRedHat(). ++ AdelieLinux, + AlpineLinux, + ArchLinux, + DebianLenny, +@@ -118,6 +119,10 @@ public: + return DistroVal >= UbuntuHardy && DistroVal <= UbuntuCosmic; + } + ++ bool IsAdelieLinux() const { ++ return DistroVal == AdelieLinux; ++ } ++ + bool IsAlpineLinux() const { + return DistroVal == AlpineLinux; + } +diff --git a/lib/Driver/Distro.cpp b/lib/Driver/Distro.cpp +index 2c4d44faf8..7ef35ab379 100644 +--- a/lib/Driver/Distro.cpp ++++ b/lib/Driver/Distro.cpp +@@ -130,6 +130,9 @@ static Distro::DistroType DetectDistro(vfs::FileSystem &VFS) { + if (VFS.exists("/etc/exherbo-release")) + return Distro::Exherbo; + ++ if (VFS.exists("/etc/adelie-release")) ++ return Distro::AdelieLinux; ++ + if (VFS.exists("/etc/alpine-release")) + return Distro::AlpineLinux; + +diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp +index 2a87cb077c..85bcd8ed47 100644 +--- a/lib/Driver/ToolChains/Linux.cpp ++++ b/lib/Driver/ToolChains/Linux.cpp +@@ -234,7 +234,8 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + ExtraOpts.push_back("now"); + } + +- if (Distro.IsOpenSUSE() || Distro.IsUbuntu() || Distro.IsAlpineLinux()) { ++ if (Distro.IsOpenSUSE() || Distro.IsUbuntu() || Distro.IsAlpineLinux() || ++ Distro.IsAdelieLinux()) { + ExtraOpts.push_back("-z"); + ExtraOpts.push_back("relro"); + } +@@ -268,7 +269,8 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + // Hexagon linker/loader does not support .gnu.hash + if (!IsMips && !IsAndroid && !IsHexagon) { + if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsAlpineLinux() || +- (Distro.IsUbuntu() && Distro >= Distro::UbuntuMaverick)) ++ Distro.IsAdelieLinux() || ++ (Distro.IsUbuntu() && Distro >= Distro::UbuntuMaverick)) + ExtraOpts.push_back("--hash-style=gnu"); + + if (Distro.IsDebian() || Distro.IsOpenSUSE() || Distro == Distro::UbuntuLucid || +-- +2.18.0 + |