From 7163fe25d573efef76ec37d14fe817c68cb337c8 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sat, 30 Jul 2022 17:12:36 -0500 Subject: user/clang: Update to 14.0.6 --- user/clang/0001-Add-support-for-Ad-lie-Linux.patch | 38 ++++++++-------------- 1 file changed, 14 insertions(+), 24 deletions(-) (limited to 'user/clang/0001-Add-support-for-Ad-lie-Linux.patch') diff --git a/user/clang/0001-Add-support-for-Ad-lie-Linux.patch b/user/clang/0001-Add-support-for-Ad-lie-Linux.patch index 4c2ef219f..a6fbcdd3f 100644 --- a/user/clang/0001-Add-support-for-Ad-lie-Linux.patch +++ b/user/clang/0001-Add-support-for-Ad-lie-Linux.patch @@ -16,7 +16,7 @@ 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: +@@ -28,6 +28,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(). @@ -24,37 +24,27 @@ index 7b34a09256..7a3774a4f1 100644 AlpineLinux, ArchLinux, DebianLenny, -@@ -120,6 +121,10 @@ public: - return DistroVal >= UbuntuHardy && DistroVal <= UbuntuDisco; +@@ -130,3 +130,5 @@ public: } -+ bool IsAdelieLinux() const { -+ return DistroVal == AdelieLinux; -+ } ++ bool IsAdelieLinux() const { return DistroVal == AdelieLinux; } + - bool IsAlpineLinux() const { - return DistroVal == AlpineLinux; - } + 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 -@@ -132,6 +132,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; - --- -2.18.0 - +@@ -36,6 +36,7 @@ + for (StringRef Line : Lines) + if (Version == Distro::UnknownDistro && Line.startswith("ID=")) + Version = llvm::StringSwitch(Line.substr(3)) ++ .Case("adelie", Distro::AdelieLinux) + .Case("alpine", Distro::AlpineLinux) + .Case("fedora", Distro::Fedora) + .Case("gentoo", Distro::Gentoo) --- cfe-8.0.0.src/lib/Driver/ToolChains/Linux.cpp.old 2018-11-29 18:52:22.000000000 +0000 +++ cfe-8.0.0.src/lib/Driver/ToolChains/Linux.cpp 2019-04-23 23:49:37.786181838 +0000 -@@ -241,13 +241,13 @@ +@@ -188,13 +188,13 @@ Distro Distro(D.getVFS()); @@ -70,7 +60,7 @@ index 2c4d44faf8..7ef35ab379 100644 ExtraOpts.push_back("-z"); ExtraOpts.push_back("relro"); } -@@ -290,7 +290,8 @@ +@@ -234,7 +234,8 @@ if (!IsMips && !IsHexagon) { if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsAlpineLinux() || (Distro.IsUbuntu() && Distro >= Distro::UbuntuMaverick) || -- cgit v1.2.3-70-g09d2