summaryrefslogtreecommitdiff
path: root/system/clang/clang-0006-Link-with-z-now-by-default-for-Alpine-Linux.patch
blob: 90de948f64434b32cd2972396a6816827fe89271 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
From: Natanael Copa <ncopa@alpinelinux.org>
From: Jakub Jirutka <jakub@jirutka.cz>
Date: Sun, 16 Apr 2017 16:49:00 +0100
Subject: [PATCH] Link with -z now by default for Alpine Linux

--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -4116,6 +4116,11 @@
 
   Distro Distro(D.getVFS());
 
+  if (Distro.IsAlpineLinux()) {
+    ExtraOpts.push_back("-z");
+    ExtraOpts.push_back("now");
+  }
+
   if (Distro.IsOpenSUSE() || Distro.IsUbuntu() || Distro.IsAlpineLinux()) {
     ExtraOpts.push_back("-z");
     ExtraOpts.push_back("relro");