[prepair] 03/04: Enable all hardening buildflags.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Fri May 13 11:29:27 UTC 2016


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository prepair.

commit 5d0cfc345eaec73730d0acc667323ec9a78a3341
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Tue May 3 10:01:48 2016 +0200

    Enable all hardening buildflags.
---
 debian/changelog               |  1 +
 debian/patches/hardening.patch | 24 ++++++++++++++++++++++++
 debian/patches/series          |  1 +
 debian/rules                   |  3 +++
 4 files changed, 29 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index bcd2c30..929a8af 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ prepair (0.7-6) UNRELEASED; urgency=medium
 
   * Bump Standards-Version to 3.9.8, no changes.
   * Drop build dependency on libcgal-qt5-dev, not required since cgal (4.8-1).
+  * Enable all hardening buildflags.
 
  -- Bas Couwenberg <sebastic at debian.org>  Tue, 03 May 2016 10:01:12 +0200
 
diff --git a/debian/patches/hardening.patch b/debian/patches/hardening.patch
new file mode 100644
index 0000000..cb53bde
--- /dev/null
+++ b/debian/patches/hardening.patch
@@ -0,0 +1,24 @@
+Description: Use hardening buildflags set in the environment.
+Author: Bas Couwenberg <sebastic at debian.org>
+Forwarded: https://github.com/tudelft3d/prepair/pull/27
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -63,6 +63,10 @@ endif()
+ 
+ include_directories( ${GDAL_INCLUDE_DIR} )
+ 
++# Hardening buildflags
++set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} $ENV{CXXFLAGS}")
++set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} $ENV{LDFLAGS}")
++
+ # Creating entries for target: prepair
+ # ############################
+ 
+@@ -75,4 +79,4 @@ endif()
+ add_to_cached_list( CGAL_EXECUTABLE_TARGETS prepair )
+ 
+ # Link to CGAL and third-party libraries
+-target_link_libraries(prepair   ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ${GDAL_LIBRARY})
+\ No newline at end of file
++target_link_libraries(prepair   ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ${GDAL_LIBRARY})
diff --git a/debian/patches/series b/debian/patches/series
index 69f0466..04bf519 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 readme-example-paths.patch
 0001-Also-list-the-shpOut-option-in-the-usage-information.patch
 gdal-2.0.patch
+hardening.patch
diff --git a/debian/rules b/debian/rules
index ff3a407..868653b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,6 +2,9 @@
 
 # DH_VERBOSE := 1
 
+# Enable hardening build flags
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+
 BUILD_DATE=$(shell dpkg-parsechangelog | sed -ne 's/^Date: //p' | LC_ALL=C date -u "+%d %B %Y" -f -)
 
 MANPAGES:=$(wildcard debian/man/*.*.xml)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/prepair.git



More information about the Pkg-grass-devel mailing list