summaryrefslogtreecommitdiffhomepage
path: root/patches/clang_host/clang-0002-Use-z-relro-on-Alpine-Linux.patch
blob: 090ec3d5096843c771c00c4f396f6126df0370b4 (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
From 1898d32d22fddf3ba6c88addbd2af0159600b506 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu, 18 Feb 2016 17:41:23 +0100
Subject: [PATCH 2/7] Use "-z relro" on Alpine Linux

---
 lib/Driver/ToolChains.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index 70b53bd..46326f0 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -3667,7 +3667,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
 
   Distro Distro = DetectDistro(D, Arch);
 
-  if (IsOpenSUSE(Distro) || IsUbuntu(Distro)) {
+  if (IsOpenSUSE(Distro) || IsUbuntu(Distro) || Distro == AlpineLinux) {
     ExtraOpts.push_back("-z");
     ExtraOpts.push_back("relro");
   }
-- 
2.7.3