aboutsummaryrefslogtreecommitdiffstats
path: root/main/clang/clang-0001-Add-Alpine-Linux-distro.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/clang/clang-0001-Add-Alpine-Linux-distro.patch')
-rw-r--r--main/clang/clang-0001-Add-Alpine-Linux-distro.patch61
1 files changed, 32 insertions, 29 deletions
diff --git a/main/clang/clang-0001-Add-Alpine-Linux-distro.patch b/main/clang/clang-0001-Add-Alpine-Linux-distro.patch
index 6cbed09d53..f69baf5b83 100644
--- a/main/clang/clang-0001-Add-Alpine-Linux-distro.patch
+++ b/main/clang/clang-0001-Add-Alpine-Linux-distro.patch
@@ -1,34 +1,37 @@
-From 4559c66aabd8b56f7127c8b1f5d22f59d3ca2390 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Thu, 18 Feb 2016 17:40:00 +0100
-Subject: [PATCH 1/7] Add Alpine Linux distro
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Sun, 16 Apr 2017 16:49:00 +0100
+Subject: [PATCH] Add Alpine Linux distro
----
- lib/Driver/ToolChains.cpp | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
-index 99c7b8e..70b53bd 100644
---- a/lib/Driver/ToolChains.cpp
-+++ b/lib/Driver/ToolChains.cpp
-@@ -3374,6 +3374,7 @@ enum Distro {
- // 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().
-+ AlpineLinux,
- ArchLinux,
- DebianLenny,
- DebianSqueeze,
-@@ -3497,6 +3498,9 @@ static Distro DetectDistro(const Driver &D, llvm::Triple::ArchType Arch) {
- if (D.getVFS().exists("/etc/arch-release"))
- return ArchLinux;
+--- a/include/clang/Driver/Distro.h
++++ b/include/clang/Driver/Distro.h
+@@ -26,6 +26,7 @@
+ // 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().
++ AlpineLinux,
+ ArchLinux,
+ DebianLenny,
+ DebianSqueeze,
+@@ -97,6 +98,10 @@
+ /// @name Convenience Predicates
+ /// @{
-+ if (D.getVFS().exists("/etc/alpine-release"))
-+ return AlpineLinux;
++ bool IsAlpineLinux() const {
++ return DistroVal == AlpineLinux;
++ }
+
- return UnknownDistro;
- }
+ bool IsRedhat() const {
+ return DistroVal == Fedora || (DistroVal >= RHEL5 && DistroVal <= RHEL7);
+ }
+--- a/lib/Driver/Distro.cpp
++++ b/lib/Driver/Distro.cpp
+@@ -128,6 +128,9 @@
+ if (VFS.exists("/etc/arch-release"))
+ return Distro::ArchLinux;
---
-2.7.3
-
++ if (VFS.exists("/etc/alpine-release"))
++ return Distro::AlpineLinux;
++
+ return Distro::UnknownDistro;
+ }