From d84cb660ff367f68465fe18fab5cd2151d73eaa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98rjan=20Malde?= Date: Thu, 16 Feb 2023 14:19:56 +0100 Subject: groups/010.host_deps.group: drop {llvm,clang}_host MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ørjan Malde --- ...ack-protector-by-default-for-alpine-linux.patch | 69 ---------------------- 1 file changed, 69 deletions(-) delete mode 100644 patches/clang_host/clang-0007-Enable-stack-protector-by-default-for-alpine-linux.patch (limited to 'patches/clang_host/clang-0007-Enable-stack-protector-by-default-for-alpine-linux.patch') diff --git a/patches/clang_host/clang-0007-Enable-stack-protector-by-default-for-alpine-linux.patch b/patches/clang_host/clang-0007-Enable-stack-protector-by-default-for-alpine-linux.patch deleted file mode 100644 index a4cb9261..00000000 --- a/patches/clang_host/clang-0007-Enable-stack-protector-by-default-for-alpine-linux.patch +++ /dev/null @@ -1,69 +0,0 @@ -From da8ea517105fff702f936695dcfae844ac85260d Mon Sep 17 00:00:00 2001 -From: Natanael Copa -Date: Tue, 23 Feb 2016 10:16:54 +0000 -Subject: [PATCH 7/7] 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); - } - -+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, -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; - 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 @@ - // 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" --- -2.7.3 - -- cgit v1.2.3