[SCM] xvidcore/master: Add hardened CFLAGS.

ceros-guest at users.alioth.debian.org ceros-guest at users.alioth.debian.org
Sat Mar 17 20:43:13 UTC 2012


The following commit has been merged in the master branch:
commit 702035834be8a750c820083e5d65f0ac1b064d3b
Author: Andres Mejia <amejia004 at gmail.com>
Date:   Sat Mar 17 13:50:01 2012 -0400

    Add hardened CFLAGS.

diff --git a/debian/changelog b/debian/changelog
index 0dea7e5..39bccd1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xvidcore (2:1.3.2-8) unstable; urgency=low
+
+  * Add in hardened CFLAGS.
+
+ -- Andres Mejia <amejia at debian.org>  Sat, 17 Mar 2012 13:49:24 -0400
+
 xvidcore (2:1.3.2-7) unstable; urgency=low
 
   * Allow dev package to be multiarch installable.
diff --git a/debian/confflags b/debian/confflags
index 6ea4574..07ec00d 100644
--- a/debian/confflags
+++ b/debian/confflags
@@ -1,10 +1,17 @@
 # -*- mode: makefile -*-
 # vim:syntax=make
 
+# Set hardened CFLAGS
+HARDENED_CFLAGS = $(shell dpkg-buildflags --get CFLAGS 2>/dev/null | sed -e 's/-g\|-O2//g')
+ifeq (,$(HARDENED_CFLAGS))
+  # Handle case for versions of Debian/Ubuntu that have dpkg-dev (<< 1.15.7).
+  HARDENED_CFLAGS = -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security
+endif
+
 # Set CFLAGS from DEB_CFLAGS if defined, otherwise let xvidcore's build system
 # set CFLAGS to use.
 DEFAULT_CFLAGS = -Wall -O3 -fstrength-reduce -finline-functions -ffast-math \
-                 -fomit-frame-pointer
+                 -fomit-frame-pointer $(HARDENED_CFLAGS)
 export CFLAGS = $(or $(DEB_CFLAGS),$(DEFAULT_CFLAGS))
 
 export DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)

-- 
xvidcore packaging



More information about the pkg-multimedia-commits mailing list