File: 002-add-fortify-flags-for-subprojects.patch

package info (click to toggle)
hyprland 0.51.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 53,472 kB
  • sloc: cpp: 70,714; xml: 4,094; sh: 254; makefile: 90
file content (21 lines) | stat: -rw-r--r-- 810 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Description: Add FORTIFY_SOURCE flag directly in Makefile
 The flag, otherwise, doesn't seem to propogate correctly to all
 modules built by the project. Use 'checksec' and 'hardening-check'
 for verifying fortification on binaries.
Author: Alan M Varghese
Last-Update: 2024-10-11
Forwarded: not-needed
Index: hyprland/CMakeLists.txt
===================================================================
--- hyprland.orig/CMakeLists.txt	2025-09-11 12:43:40.719566353 +0800
+++ hyprland/CMakeLists.txt	2025-09-11 12:44:01.750322633 +0800
@@ -93,7 +93,8 @@
   -Wno-narrowing
   -Wno-pointer-arith
   -Wno-clobbered
-  -fmacro-prefix-map=${CMAKE_SOURCE_DIR}/=)
+  -fmacro-prefix-map=${CMAKE_SOURCE_DIR}/=
+  -D_FORTIFY_SOURCE=2)
 
 set(CMAKE_EXECUTABLE_ENABLE_EXPORTS TRUE)
 set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)