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-0007-Enable-stack-protector-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-0007-Enable-stack-protector-by-default-for-alpine-linux.patch')
-rw-r--r-- | system/clang/clang-0007-Enable-stack-protector-by-default-for-alpine-linux.patch | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/system/clang/clang-0007-Enable-stack-protector-by-default-for-alpine-linux.patch b/system/clang/clang-0007-Enable-stack-protector-by-default-for-alpine-linux.patch deleted file mode 100644 index 3487799b1..000000000 --- a/system/clang/clang-0007-Enable-stack-protector-by-default-for-alpine-linux.patch +++ /dev/null @@ -1,54 +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 stack protector by default for Alpine Linux - ---- a/lib/Driver/ToolChains.cpp -+++ b/lib/Driver/ToolChains.cpp -@@ -4866,6 +4866,13 @@ - CmdArgs.push_back("-lunwind"); - } - -+unsigned Linux::GetDefaultStackProtectorLevel(bool KernelOrKext) const { -+ StringRef VendorName = Linux::getTriple().getVendorName(); -+ if (VendorName.compare("alpine") == 0) -+ return 2; -+ return 1; -+} -+ - /// DragonFly - DragonFly tool chain which can call as(1) and ld(1) directly. - - DragonFly::DragonFly(const Driver &D, const llvm::Triple &Triple, ---- a/lib/Driver/ToolChains.h -+++ b/lib/Driver/ToolChains.h -@@ -880,6 +880,7 @@ - void AddIAMCUIncludeArgs(const llvm::opt::ArgList &DriverArgs, - llvm::opt::ArgStringList &CC1Args) const override; - bool isPIEDefault() const override; -+ unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override; - SanitizerMask getSupportedSanitizers() const override; - void addProfileRTLibs(const llvm::opt::ArgList &Args, - llvm::opt::ArgStringList &CmdArgs) const override; ---- a/test/Driver/stack-protector.c -+++ b/test/Driver/stack-protector.c -@@ -24,6 +24,20 @@ - // SSP-ALL: "-stack-protector" "3" - // SSP-ALL-NOT: "-stack-protector-buffer-size" - -+// RUN: %clang -target x86_64-alpine-linux-musl -### %s 2>&1 | FileCheck %s -check-prefix=ALPINE -+// ALPINE: "-stack-protector" "2" -+ -+// RUN: %clang -target x86_64-alpine-linux-musl -fstack-protector -### %s 2>&1 | FileCheck %s -check-prefix=ALPINE_SPS -+// ALPINE_SPS: "-stack-protector" "2" -+ -+// RUN: %clang -target x86_64-alpine-linux-musl -fstack-protector-all -### %s 2>&1 | FileCheck %s -check-prefix=ALPINE_ALL -+// ALPINE_ALL: "-stack-protector" "3" -+// ALPINE_ALL-NOT: "-stack-protector-buffer-size" -+ -+// RUN: %clang -target x86_64-alpine-linux-musl -fno-stack-protector -### %s 2>&1 | FileCheck %s -check-prefix=ALPINE_NOSSP -+// ALPINE_NOSSP-NOT: "-stack-protector" -+// ALPINE_NOSSP-NOT: "-stack-protector-buffer-size" -+ - // RUN: %clang -target x86_64-scei-ps4 -### %s 2>&1 | FileCheck %s -check-prefix=SSP-PS4 - // RUN: %clang -target x86_64-scei-ps4 -fstack-protector -### %s 2>&1 | FileCheck %s -check-prefix=SSP-PS4 - // SSP-PS4: "-stack-protector" "2" |