diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-05-22 13:43:22 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-05-22 13:43:22 +0000 |
commit | 70622e24effd147a1d3e6206607f73ccdba33e8f (patch) | |
tree | 9f6ad37ec2977a564c47819340add467227c9dc0 /main/llvm/clang-0008-alpine-PIE-by-default.patch | |
parent | 95623fb7c14e2129b8e4f39e947d99dc85d3e158 (diff) | |
download | aports-70622e24effd147a1d3e6206607f73ccdba33e8f.tar.bz2 aports-70622e24effd147a1d3e6206607f73ccdba33e8f.tar.xz |
Revert "main/llvm: update patchset, switch to cmake, perform two-stage build with a minimal bootstrap compile of clang, add clang extras, update package list to split out clang documentation"
This reverts commit 81d1b43c5af39e14cb91232c4afcb7839b96f5a1.
Diffstat (limited to 'main/llvm/clang-0008-alpine-PIE-by-default.patch')
-rw-r--r-- | main/llvm/clang-0008-alpine-PIE-by-default.patch | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/main/llvm/clang-0008-alpine-PIE-by-default.patch b/main/llvm/clang-0008-alpine-PIE-by-default.patch deleted file mode 100644 index 04c745c09e..0000000000 --- a/main/llvm/clang-0008-alpine-PIE-by-default.patch +++ /dev/null @@ -1,67 +0,0 @@ -From fec8bdd3fc2d45dc1da8e6b94c1b264a6431685e Mon Sep 17 00:00:00 2001 -From: Travis Tilley <ttilley@gmail.com> -Date: Sat, 9 May 2015 23:02:45 -0400 -Subject: [PATCH 8/8] enable PIE by default behavior on alpine linux add -nopie - flag for disabling this behavior - ---- - lib/Driver/ToolChains.cpp | 3 +++ - lib/Driver/Tools.cpp | 4 +++- - test/Driver/pic.c | 12 ++++++++++++ - 3 files changed, 18 insertions(+), 1 deletion(-) - -diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp -index 44e929f..3f25a36 100644 ---- a/lib/Driver/ToolChains.cpp -+++ b/lib/Driver/ToolChains.cpp -@@ -3397,6 +3397,9 @@ void Linux::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, - } - - bool Linux::isPIEDefault() const { -+ StringRef VendorName = Linux::getTriple().getVendorName(); -+ if (VendorName.compare("alpine") == 0) -+ return true; - return getSanitizerArgs().requiresPIE(); - } - -diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp -index 3e71522..9a0fc84 100644 ---- a/lib/Driver/Tools.cpp -+++ b/lib/Driver/Tools.cpp -@@ -7462,7 +7462,9 @@ void gnutools::Link::ConstructJob(Compilation &C, const JobAction &JA, - 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"); - - if (Args.hasArg(options::OPT_rdynamic)) -diff --git a/test/Driver/pic.c b/test/Driver/pic.c -index a3d989c..b1a55ae 100644 ---- a/test/Driver/pic.c -+++ b/test/Driver/pic.c -@@ -225,6 +225,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 --- -2.1.4 - |