[med-svn] [ray] 02/02: Fix hardening

Sascha Steinbiss sascha at steinbiss.name
Wed May 18 21:58:50 UTC 2016


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

sascha-guest pushed a commit to branch master
in repository ray.

commit 5334196f9809461bff77c047decbbd245520ed86
Author: Sascha Steinbiss <sascha at steinbiss.name>
Date:   Wed May 18 21:45:37 2016 +0000

    Fix hardening
---
 debian/changelog               |  1 +
 debian/patches/hardening.patch | 52 ++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 51 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 1dee9f3..778460363 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ ray (2.3.1-4) unstable; urgency=medium
 
   * Team upload.
   * Enforce stable sort order for linking to make build reproducible.
+  * Fix hardening by using CPPFLAGS etc.
 
  -- Sascha Steinbiss <sascha at steinbiss.name>  Wed, 18 May 2016 21:06:31 +0000
 
diff --git a/debian/patches/hardening.patch b/debian/patches/hardening.patch
index 63ea350..90ac846 100644
--- a/debian/patches/hardening.patch
+++ b/debian/patches/hardening.patch
@@ -4,7 +4,16 @@ Description: Propagate hardening options
 
 --- a/Makefile
 +++ b/Makefile
-@@ -145,7 +145,7 @@ CONFIG_FLAGS-y += -D CONFIG_RAY_VERSION=
+@@ -26,7 +26,7 @@
+ MPICXX = mpicxx
+ 
+ # CXXFLAGS can be changed by the end user with make CXXFLAGS="..."
+-CXXFLAGS = -O3 -std=c++98 -Wall -g
++CXXFLAGS += -O3 -std=c++98 -Wall -g
+ 
+ RM = rm
+ CD = cd
+@@ -145,10 +145,9 @@
  
  # CONFIG_FLAGS is separate from CXXFLAGS
  # This eases building the package in distributions
@@ -12,4 +21,43 @@ Description: Propagate hardening options
 +LDFLAGS = $(LDFLAGS-y) $(DEBLDFLAGS)
  CONFIG_FLAGS=$(CONFIG_FLAGS-y)
  
- Q=@
+-Q=@
+ 
+ #######################################################################
+ # Build rules.
+@@ -158,7 +157,7 @@
+ # inference rule
+ %.o: %.cpp
+ 	$(Q)$(ECHO) "  CXX $@"
+-	$(Q)$(MPICXX) $(CXXFLAGS) $(CONFIG_FLAGS) -I. -IRayPlatform -c $< -o $@
++	$(Q)$(MPICXX) $(CPPFLAGS) $(CXXFLAGS) $(CONFIG_FLAGS) -I. -IRayPlatform -c $< -o $@
+ 
+ include code/*/Makefile
+ 
+--- a/RayPlatform/common.mk
++++ b/RayPlatform/common.mk
+@@ -3,11 +3,11 @@
+ RM = rm
+ ECHO = echo
+ 
+-Q=@
++#Q=@
+ 
+ ASSERT=n
+ ASSERT-$(ASSERT)= -DASSERT
+-CXXFLAGS= -O3 -Wall -std=c++98 $(ASSERT-y)
++CXXFLAGS += -O3 -Wall -std=c++98 $(ASSERT-y)
+ 
+ #memory
+ obj-y += RayPlatform/memory/ReusableMemoryStore.o 
+--- a/RayPlatform/Makefile
++++ b/RayPlatform/Makefile
+@@ -30,7 +30,7 @@
+ # inference rule
+ %.o: %.cpp
+ 	$(Q)$(ECHO) "  CXX $@"
+-	$(Q)$(MPICXX) $(CXXFLAGS) $(CONFIG_FLAGS) -D RAYPLATFORM_VERSION=\"$(RAYPLATFORM_VERSION)\" -I. -c -o $@ $<
++	$(Q)$(MPICXX) $(CPPFLAGS) $(CXXFLAGS) $(CONFIG_FLAGS) -D RAYPLATFORM_VERSION=\"$(RAYPLATFORM_VERSION)\" -I. -c -o $@ $<
+ 
+ clean:
+ 	$(Q)$(ECHO) CLEAN RayPlatform

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/ray.git



More information about the debian-med-commit mailing list