diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-04-16 18:37:24 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-04-22 02:45:59 +0200 |
commit | c0f3c8c71e90f25a912bc24f92c309f6fecac2ac (patch) | |
tree | dc4ae8366b37c12c12cde4a1c058c6a262048d09 /main/clang/clang-0007-Enable-stack-protector-by-default-for-alpine-linux.patch | |
parent | 4fa26deecb7919b84546187714fd3369f4b7af95 (diff) | |
download | aports-c0f3c8c71e90f25a912bc24f92c309f6fecac2ac.tar.bz2 aports-c0f3c8c71e90f25a912bc24f92c309f6fecac2ac.tar.xz |
main/clang: upgrade to 4.0.0
Diffstat (limited to 'main/clang/clang-0007-Enable-stack-protector-by-default-for-alpine-linux.patch')
-rw-r--r-- | main/clang/clang-0007-Enable-stack-protector-by-default-for-alpine-linux.patch | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/main/clang/clang-0007-Enable-stack-protector-by-default-for-alpine-linux.patch b/main/clang/clang-0007-Enable-stack-protector-by-default-for-alpine-linux.patch index a4cb926181..3487799b1b 100644 --- a/main/clang/clang-0007-Enable-stack-protector-by-default-for-alpine-linux.patch +++ b/main/clang/clang-0007-Enable-stack-protector-by-default-for-alpine-linux.patch @@ -1,20 +1,12 @@ -From da8ea517105fff702f936695dcfae844ac85260d Mon Sep 17 00:00:00 2001 From: Natanael Copa <ncopa@alpinelinux.org> -Date: Tue, 23 Feb 2016 10:16:54 +0000 -Subject: [PATCH 7/7] Enable stack protector by default for alpine linux +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 ---- - lib/Driver/ToolChains.cpp | 7 +++++++ - lib/Driver/ToolChains.h | 1 + - test/Driver/stack-protector.c | 14 ++++++++++++++ - 3 files changed, 22 insertions(+) - -diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp -index 1a8ebf5..59b7601 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp -@@ -4193,6 +4193,13 @@ void Linux::addProfileRTLibs(const llvm::opt::ArgList &Args, - ToolChain::addProfileRTLibs(Args, CmdArgs); +@@ -4866,6 +4866,13 @@ + CmdArgs.push_back("-lunwind"); } +unsigned Linux::GetDefaultStackProtectorLevel(bool KernelOrKext) const { @@ -27,20 +19,16 @@ index 1a8ebf5..59b7601 100644 /// DragonFly - DragonFly tool chain which can call as(1) and ld(1) directly. DragonFly::DragonFly(const Driver &D, const llvm::Triple &Triple, -diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h -index f940e58..977ea66 100644 --- a/lib/Driver/ToolChains.h +++ b/lib/Driver/ToolChains.h -@@ -796,6 +796,7 @@ public: - void AddCudaIncludeArgs(const llvm::opt::ArgList &DriverArgs, - llvm::opt::ArgStringList &CC1Args) const override; +@@ -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; -diff --git a/test/Driver/stack-protector.c b/test/Driver/stack-protector.c -index 487af56..2fbd39a 100644 --- a/test/Driver/stack-protector.c +++ b/test/Driver/stack-protector.c @@ -24,6 +24,20 @@ @@ -64,6 +52,3 @@ index 487af56..2fbd39a 100644 // 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" --- -2.7.3 - |