File: add-fortify-source-missing-flag.patch

package info (click to toggle)
pytango 10.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,196 kB
  • sloc: python: 28,206; cpp: 16,380; sql: 255; sh: 82; makefile: 43
file content (22 lines) | stat: -rw-r--r-- 702 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Description: Make cmake adds a fortify source C++ flag
 cmake doesn't understand debian's common way to export C/C++ flags, so let's
 include the fortify source hardening flag manually.
Author: Santiago Ruano Rincón <santiago@freexian.com>
Last-Update: 2025-03-13
Bug: https://gitlab.com/tango-controls/pytango/-/issues/671

Index: pytango/CMakeLists.txt
===================================================================
--- pytango.orig/CMakeLists.txt
+++ pytango/CMakeLists.txt
@@ -13,6 +13,10 @@ project(
     LANGUAGES CXX
 )
 
+if(NOT WIN32)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORTIFY_SOURCE=3")
+endif()
+
 include(cmake/project-is-top-level.cmake)
 
 # ---- Dependencies -------