aboutsummaryrefslogtreecommitdiffstats
path: root/main/llvm/clang-3.6-alpine-use-z-relro.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/llvm/clang-3.6-alpine-use-z-relro.patch')
-rw-r--r--main/llvm/clang-3.6-alpine-use-z-relro.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/main/llvm/clang-3.6-alpine-use-z-relro.patch b/main/llvm/clang-3.6-alpine-use-z-relro.patch
new file mode 100644
index 0000000000..bd7cea08c8
--- /dev/null
+++ b/main/llvm/clang-3.6-alpine-use-z-relro.patch
@@ -0,0 +1,19 @@
+diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
+index f789fd5..6d75b4b 100644
+--- a/lib/Driver/ToolChains.cpp
++++ b/lib/Driver/ToolChains.cpp
+@@ -2930,13 +2940,13 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
+ GCCInstallation.getTriple().str() + "/bin").str());
+
+ Linker = GetLinkerPath();
+
+ Distro Distro = DetectDistro(Arch);
+
+- if (IsOpenSUSE(Distro) || IsUbuntu(Distro)) {
++ if (IsOpenSUSE(Distro) || IsUbuntu(Distro) || Distro == AlpineLinux) {
+ ExtraOpts.push_back("-z");
+ ExtraOpts.push_back("relro");
+ }
+
+ if (Arch == llvm::Triple::arm || Arch == llvm::Triple::thumb)
+ ExtraOpts.push_back("-X");