[Pkg-voip-commits] r10006 - in /libpri/trunk/debian: changelog patches/enable-gcc-optimizations patches/flags patches/series rules

tzafrir at alioth.debian.org tzafrir at alioth.debian.org
Wed Oct 10 17:10:09 UTC 2012


Author: tzafrir
Date: Wed Oct 10 17:10:07 2012
New Revision: 10006

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=10006
Log:
* Pass flags from dkpg-buildflags to the build system:
  - Add patch 'flags; to do that.
  - Patch enable-gcc-optimizations no longer does this part.
  - This library is now hardened.

Added:
    libpri/trunk/debian/patches/flags
Modified:
    libpri/trunk/debian/changelog
    libpri/trunk/debian/patches/enable-gcc-optimizations
    libpri/trunk/debian/patches/series
    libpri/trunk/debian/rules

Modified: libpri/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/libpri/trunk/debian/changelog?rev=10006&op=diff
==============================================================================
--- libpri/trunk/debian/changelog (original)
+++ libpri/trunk/debian/changelog Wed Oct 10 17:10:07 2012
@@ -1,6 +1,10 @@
 libpri (1.4.12-3) UNRELEASED; urgency=low
 
   * Remove version.c on clean (Closes: #688765).
+  * Pass flags from dkpg-buildflags to the build system:
+    - Add patch 'flags; to do that.
+    - Patch enable-gcc-optimizations no longer does this part.
+    - This library is now hardened.
 
  -- Tzafrir Cohen <tzafrir at debian.org>  Wed, 26 Sep 2012 01:37:55 +0200
 

Modified: libpri/trunk/debian/patches/enable-gcc-optimizations
URL: http://svn.debian.org/wsvn/pkg-voip/libpri/trunk/debian/patches/enable-gcc-optimizations?rev=10006&op=diff
==============================================================================
--- libpri/trunk/debian/patches/enable-gcc-optimizations (original)
+++ libpri/trunk/debian/patches/enable-gcc-optimizations Wed Oct 10 17:10:07 2012
@@ -1,19 +1,11 @@
-Don't discard CFLAGS of the environment and turn off all optimizations as
-those are handled by our build system.
+Description: remove unneeded and obsolete CPU optimizations
+Author: Faidon Liambotis <paravoid at debian.org>
 
-Author: Faidon Liambotis <paravoid at debian.org>
+We pass our own flags anyway, so such magic optimization flags are not
+likely to help.
 
 --- a/Makefile
 +++ b/Makefile
-@@ -90,7 +90,7 @@ DYNAMIC_OBJS= \
- 	rose_qsig_mwi.lo \
- 	rose_qsig_name.lo \
- 	version.lo
--CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC $(ALERTING) $(LIBPRI_OPT) $(COVERAGE_CFLAGS)
-+CFLAGS+=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC $(ALERTING) $(LIBPRI_OPT) $(COVERAGE_CFLAGS)
- INSTALL_PREFIX=$(DESTDIR)
- INSTALL_BASE=/usr
- libdir?=$(INSTALL_BASE)/lib
 @@ -124,22 +124,6 @@ export PRIVERSION
  
  PRIVERSION:=$(shell GREP=$(GREP) AWK=$(AWK) build_tools/make_version .)

Added: libpri/trunk/debian/patches/flags
URL: http://svn.debian.org/wsvn/pkg-voip/libpri/trunk/debian/patches/flags?rev=10006&op=file
==============================================================================
--- libpri/trunk/debian/patches/flags (added)
+++ libpri/trunk/debian/patches/flags Wed Oct 10 17:10:07 2012
@@ -1,0 +1,34 @@
+Author: Tzafrir Cohen <tzafrir at debian.org>
+Description: Allow overriding LDFLAGS and CFLAGS
+Bug: https://issues.asterisk.org/jira/browse/PRI-144
+Origin: http://svnview.digium.com/svn/libpri?view=rev&rev=2300
+
+Allow the builder to set its own build flags (optional CFLAGS and
+LDFLAGS).
+
+--- a/Makefile
++++ b/Makefile
+@@ -90,18 +90,20 @@ DYNAMIC_OBJS= \
+ 	rose_qsig_mwi.lo \
+ 	rose_qsig_name.lo \
+ 	version.lo
+-CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC $(ALERTING) $(LIBPRI_OPT) $(COVERAGE_CFLAGS)
++CFLAGS ?= -g
++CFLAGS += -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes
++CFLAGS += -fPIC $(ALERTING) $(LIBPRI_OPT) $(COVERAGE_CFLAGS)
+ INSTALL_PREFIX=$(DESTDIR)
+ INSTALL_BASE=/usr
+ libdir?=$(INSTALL_BASE)/lib
+ ifneq ($(findstring Darwin,$(OSARCH)),)
+-  SOFLAGS=-dynamic -bundle -Xlinker -macosx_version_min -Xlinker 10.4 -Xlinker -undefined -Xlinker dynamic_lookup -force_flat_namespace
++  SOFLAGS=$(LDFLAGS) -dynamic -bundle -Xlinker -macosx_version_min -Xlinker 10.4 -Xlinker -undefined -Xlinker dynamic_lookup -force_flat_namespace
+   ifeq ($(shell /usr/bin/sw_vers -productVersion | cut -c1-4),10.6)
+     SOFLAGS+=/usr/lib/bundle1.o
+   endif
+   LDCONFIG=/usr/bin/true
+ else
+-  SOFLAGS=-shared -Wl,-h$(DYNAMIC_LIBRARY) $(COVERAGE_LDFLAGS)
++  SOFLAGS=$(LDFLAGS) -shared -Wl,-h$(DYNAMIC_LIBRARY) $(COVERAGE_LDFLAGS)
+   LDCONFIG = /sbin/ldconfig
+ endif
+ ifneq (,$(findstring X$(OSARCH)X, XLinuxX XGNU/kFreeBSDX XGNUX))

Modified: libpri/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/libpri/trunk/debian/patches/series?rev=10006&op=diff
==============================================================================
--- libpri/trunk/debian/patches/series (original)
+++ libpri/trunk/debian/patches/series Wed Oct 10 17:10:07 2012
@@ -1,2 +1,3 @@
+flags
 spelling-error-in-binary.patch
 enable-gcc-optimizations

Modified: libpri/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-voip/libpri/trunk/debian/rules?rev=10006&op=diff
==============================================================================
--- libpri/trunk/debian/rules (original)
+++ libpri/trunk/debian/rules Wed Oct 10 17:10:07 2012
@@ -1,4 +1,13 @@
 #!/usr/bin/make -f
+
+# := as there's no configure script in the middle right now and we want
+#    to see explicit flags in the build log.
+CFLAGS := `dpkg-buildflags --get CFLAGS`
+LDFLAGS := `dpkg-buildflags --get LDFLAGS`
+CFLAGS +:= `dpkg-buildflags --get CPPFLAGS`
+
+export CFLAGS LDFLAGS
+
 %:
 	dh $@
 




More information about the Pkg-voip-commits mailing list