[Pkg-voip-commits] [asterisk] 01/01: fix some build log checks warnings

Jeremy Lainé sharky at moszumanska.debian.org
Fri Sep 26 09:26:51 UTC 2014


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

sharky pushed a commit to branch master
in repository asterisk.

commit b6c4f77e05e5468da280da4455ef170abe9fb127
Author: Jeremy Lainé <jeremy.laine at m4x.org>
Date:   Fri Sep 26 11:26:21 2014 +0200

    fix some build log checks warnings
---
 debian/patches/buildflags.patch | 18 ++++++++++++++++++
 debian/patches/series           |  1 +
 debian/rules                    | 13 +++----------
 3 files changed, 22 insertions(+), 10 deletions(-)

diff --git a/debian/patches/buildflags.patch b/debian/patches/buildflags.patch
new file mode 100644
index 0000000..00fda03
--- /dev/null
+++ b/debian/patches/buildflags.patch
@@ -0,0 +1,18 @@
+From: Jeremy Lainé <jeremy.laine at m4x.org>
+
+Disable asterisk's fortify source options, this is already handled
+by Debian's build flags.
+
+diff --git a/Makefile.rules b/Makefile.rules
+index d035f97..fb63634 100644
+--- a/Makefile.rules
++++ b/Makefile.rules
+@@ -82,8 +82,6 @@ CXX_LIBS=$(PTHREAD_LIBS) $(LIBS)
+ # and if that doesn't fail then compile again with optimizer disabled
+ ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS))$(AST_DEVMODE),DONT_OPTIMIZEyes)
+ COMPILE_DOUBLE=yes
+-else
+-_ASTCFLAGS+=$(AST_FORTIFY_SOURCE)
+ endif
+ 
+ ifeq ($(findstring BUILD_NATIVE,$(MENUSELECT_CFLAGS)),BUILD_NATIVE)
diff --git a/debian/patches/series b/debian/patches/series
index b609ab5..500cb11 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -32,3 +32,4 @@ smsq_enable.patch
 escape_manpage_hyphen.patch
 aelparse_enable.patch
 res_fax_bounds.patch
+buildflags.patch
diff --git a/debian/rules b/debian/rules
index fc58174..ff182b4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,9 +2,6 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-# Necessary to pass hardening flags to menuselect.
-# export CFLAGS LDFLAGS BUILD_CFLAGS BUILD_LDFLAGS
-
 # Starting with dpkg-dev >= 1.16.1.1 you can use the new buildflags.mk file
 # to set all *FLAGS
 # When building programs that handle untrusted data
@@ -34,12 +31,8 @@ BUILD_OS=$(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
 
 export PROC := $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)
 
-ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
-	BUILDFLAGS += OPTIMIZE=-O0
-else
-	BUILDFLAGS += OPTIMIZE=-O2
-endif
-BUILDFLAGS += MAKECMDGOALS=dont-optimize
+# don't let asterisk mess with build flags
+BUILDFLAGS += MAKECMDGOALS=dont-optimize DEBUG= OPTIMIZE=
 
 # show full gcc arguments instead of [CC] and [LD]
 BUILDFLAGS += NOISY_BUILD=yes
@@ -97,7 +90,7 @@ override_dh_auto_configure:
 #		--with-cap \
 
 override_dh_auto_build:
-	$(MAKE) menuselect.makeopts
+	$(MAKE) menuselect.makeopts BUILD_CFLAGS="$(CFLAGS) $(CPPFLAGS)" BUILD_LDFLAGS="$(LDFLAGS)"
 	@if [ "x${ENABLE_DEBUG}" != "x" ] ; then \
 		menuselect/menuselect --enable BETTER_BACKTRACES menuselect.makeopts ; \
 		menuselect/menuselect --enable DONT_OPTIMIZE menuselect.makeopts ; \

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



More information about the Pkg-voip-commits mailing list