summaryrefslogtreecommitdiffhomepage
path: root/patches/clang_host/clang-0001-Add-Alpine-Linux-distro.patch
blob: 6cbed09d535640fa8b11d7842d10097fd5ded216 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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

---
 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;
 
+  if (D.getVFS().exists("/etc/alpine-release"))
+    return AlpineLinux;
+
   return UnknownDistro;
 }
 
-- 
2.7.3