File: enable_hardening.patch

package info (click to toggle)
libqtpas 2.6%2B2.2.0%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,896 kB
  • sloc: cpp: 57,115; pascal: 13,727; sh: 43; makefile: 14
file content (23 lines) | stat: -rw-r--r-- 983 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
23
Description: In order to enable hardening flags we need to pass them to
 QMAKE. According to
 https://wiki.debian.org/Hardening#Notes_for_packages_using_QMake this is the
 easiest way.
Author: Paul Gevers <elbrus@debian.org>

Index: libqtpas/Qt5Pas.pro
===================================================================
--- libqtpas.orig/Qt5Pas.pro
+++ libqtpas/Qt5Pas.pro
@@ -8,7 +8,11 @@
 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 #******************************************************************************
 
-
+# As described on https://wiki.debian.org/Hardening#Notes_for_packages_using_QMake
+QMAKE_CPPFLAGS *= $(shell dpkg-buildflags --get CPPFLAGS)
+QMAKE_CFLAGS   *= $(shell dpkg-buildflags --get CFLAGS)
+QMAKE_CXXFLAGS *= $(shell dpkg-buildflags --get CXXFLAGS)
+QMAKE_LFLAGS   *= $(shell dpkg-buildflags --get LDFLAGS)
 
 # Binding Release Version 2.6 against Qt5 5.6 LTS release.
 # WebKit widgets are disabled until webenginewidgets are implemented.