diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-09-15 20:01:45 +0000 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-09-15 20:01:45 +0000 |
commit | 8642108eae6cbb08930c10a883407a7ec2b2be1f (patch) | |
tree | d07f274152fd85a060cb72bf31ac70951804a79d /system/clang/clang-0005-Enable-PIE-by-default-for-alpine-linux.patch | |
parent | de7967e51d8a8b525054bca4dd72dae1b32a48dd (diff) | |
download | packages-8642108eae6cbb08930c10a883407a7ec2b2be1f.tar.gz packages-8642108eae6cbb08930c10a883407a7ec2b2be1f.tar.bz2 packages-8642108eae6cbb08930c10a883407a7ec2b2be1f.tar.xz packages-8642108eae6cbb08930c10a883407a7ec2b2be1f.zip |
Bump LLVM and Clang to 6.0.1, move to user/
Diffstat (limited to 'system/clang/clang-0005-Enable-PIE-by-default-for-alpine-linux.patch')
-rw-r--r-- | system/clang/clang-0005-Enable-PIE-by-default-for-alpine-linux.patch | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/system/clang/clang-0005-Enable-PIE-by-default-for-alpine-linux.patch b/system/clang/clang-0005-Enable-PIE-by-default-for-alpine-linux.patch deleted file mode 100644 index 7cd79addc..000000000 --- a/system/clang/clang-0005-Enable-PIE-by-default-for-alpine-linux.patch +++ /dev/null @@ -1,55 +0,0 @@ -From: Natanael Copa <ncopa@alpinelinux.org> -From: Jakub Jirutka <jakub@jirutka.cz> -Date: Sun, 16 Apr 2017 16:49:00 +0100 -Subject: [PATCH] Enable PIE by default for Alpine Linux - -Alpine Linux uses PIE by default. - ---- a/lib/Driver/ToolChains.cpp -+++ b/lib/Driver/ToolChains.cpp -@@ -4721,7 +4721,10 @@ - } - } - --bool Linux::isPIEDefault() const { return getSanitizerArgs().requiresPIE(); } -+bool Linux::isPIEDefault() const { -+ return getSanitizerArgs().requiresPIE() || -+ Linux::getTriple().getVendorName().compare("alpine") == 0; -+} - - SanitizerMask Linux::getSupportedSanitizers() const { - const bool IsX86 = getTriple().getArch() == llvm::Triple::x86; ---- a/lib/Driver/Tools.cpp -+++ b/lib/Driver/Tools.cpp -@@ -9258,7 +9258,9 @@ - if (!D.SysRoot.empty()) - CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot)); - -- if (IsPIE) -+ if (Args.hasArg(options::OPT_nopie)) -+ CmdArgs.push_back("-nopie"); -+ else if (IsPIE) - CmdArgs.push_back("-pie"); - - CmdArgs.push_back("--eh-frame-hdr"); ---- a/test/Driver/pic.c -+++ b/test/Driver/pic.c -@@ -244,6 +244,18 @@ - // RUN: %clang %s -target i386-pc-openbsd -nopie -### 2>&1 \ - // RUN: | FileCheck %s --check-prefix=CHECK-NOPIE-LD - // -+// On Alpine Linux, we want similar PIE-by-default behavior -+// RUN: %clang -c %s -target x86_64-alpine-linux-musl -### 2>&1 \ -+// RUN: | FileCheck %s --check-prefix=CHECK-PIE2 -+// RUN: %clang -c %s -target i686-alpine-linux-musl -### 2>&1 \ -+// RUN: | FileCheck %s --check-prefix=CHECK-PIE2 -+// RUN: %clang -c %s -target armv6-alpine-linux-musleabihf -### 2>&1 \ -+// RUN: | FileCheck %s --check-prefix=CHECK-PIE2 -+// RUN: %clang -c %s -target armv7-alpine-linux-musleabihf -### 2>&1 \ -+// RUN: | FileCheck %s --check-prefix=CHECK-PIE2 -+// RUN: %clang %s -target x86_64-alpine-linux-musl -nopie -### 2>&1 \ -+// RUN: | FileCheck %s --check-prefix=CHECK-NOPIE-LD -+// - // On Android PIC is enabled by default - // RUN: %clang -c %s -target i686-linux-android -### 2>&1 \ - // RUN: | FileCheck %s --check-prefix=CHECK-PIC2 |