pkgs/llvm-project/0006-clang-use-strong-stack-protector-by-default.patch
2023-12-08 21:44:38 -08:00

28 lines
841 B
Diff

From 2f325a39fef9a95f679a04e5058839bd795c5145 Mon Sep 17 00:00:00 2001
From: Daniel Kolesa <daniel@octaforge.org>
Date: Tue, 2 May 2023 16:23:22 +0200
Subject: [PATCH 6/6] clang: use strong stack protector by default
---
clang/lib/Driver/ToolChains/Linux.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/clang/lib/Driver/ToolChains/Linux.h b/clang/lib/Driver/ToolChains/Linux.h
index 524391743..bfaa3a8a7 100644
--- a/clang/lib/Driver/ToolChains/Linux.h
+++ b/clang/lib/Driver/ToolChains/Linux.h
@@ -65,6 +65,11 @@ public:
const char *getDefaultLinker() const override;
+ LangOptions::StackProtectorMode
+ GetDefaultStackProtectorLevel(bool KernelOrKext) const override {
+ return LangOptions::SSPStrong;
+ }
+
protected:
Tool *buildAssembler() const override;
Tool *buildLinker() const override;
--
2.43.0