From c8cd427e30891a040746e5020b5a2203f07398bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Thu, 30 Jan 2025 20:13:29 +0100 Subject: [PATCH] build: extend stack protection * use -fstack-protector-strong and -fstack-clash-protection * also bin and some user add-ons Change-Id: I593365e55414ac447bde54980a5c73202e9bb172 Reviewed-on: https://review.haiku-os.org/c/haiku/+/8887 Tested-by: Commit checker robot Reviewed-by: waddlesplash Reviewed-by: Adrien Destugues Haiku-Format: Haiku-format Bot --- build/jam/ArchitectureRules | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/build/jam/ArchitectureRules b/build/jam/ArchitectureRules index 755111e060..6a19268390 100644 --- a/build/jam/ArchitectureRules +++ b/build/jam/ArchitectureRules @@ -618,9 +618,9 @@ rule ArchitectureSetupWarnings architecture # enable stack protector, if requested if $(HAIKU_USE_STACK_PROTECTOR) = 1 { AppendToConfigVar CCFLAGS : HAIKU_TOP $(dirTokens) : - -fstack-protector : $(scope) ; + -fstack-protector-strong -fstack-clash-protection : $(scope) ; AppendToConfigVar C++FLAGS : HAIKU_TOP $(dirTokens) : - -fstack-protector : $(scope) ; + -fstack-protector-strong -fstack-clash-protection : $(scope) ; } } @@ -795,6 +795,12 @@ rule ArchitectureSetupWarnings architecture EnableWerror src system libroot posix wchar ; EnableWerror src system runtime_loader ; + EnableStackProtector src add-ons input_server ; + EnableStackProtector src add-ons media ; + EnableStackProtector src add-ons print ; + EnableStackProtector src add-ons screen_savers ; + EnableStackProtector src add-ons translators ; + EnableStackProtector src bin ; EnableStackProtector src apps ; EnableStackProtector src kits ; EnableStackProtector src preferences ;