[Python-modules-commits] r19229 - in packages/python-crypto/trunk/debian (3 files)
sramacher-guest at users.alioth.debian.org
sramacher-guest at users.alioth.debian.org
Sat Nov 12 16:06:13 UTC 2011
Date: Saturday, November 12, 2011 @ 16:06:09
Author: sramacher-guest
Revision: 19229
Honor noopt.
* debian/patches/donot-drop-g.patch: update to don't drop optimization
flags and to don't append -O3.
* debian/rules: if noopt is not set, append -O3 to CFLAGS (as upstream does).
Modified:
packages/python-crypto/trunk/debian/changelog
packages/python-crypto/trunk/debian/patches/dont-drop-g.patch
packages/python-crypto/trunk/debian/rules
Modified: packages/python-crypto/trunk/debian/changelog
===================================================================
--- packages/python-crypto/trunk/debian/changelog 2011-11-12 14:34:47 UTC (rev 19228)
+++ packages/python-crypto/trunk/debian/changelog 2011-11-12 16:06:09 UTC (rev 19229)
@@ -2,8 +2,13 @@
* New upstream release.
* debian/rules: also export CPPFLAGS to honor all hardening flags.
+ * Honor noopt.
+ - debian/patches/donot-drop-g.patch: update to don't drop optimization
+ flags and to don't append -O3.
+ - debian/rules: if noopt is not set, append -O3 to CFLAGS (as upstream
+ does).
- -- Sebastian Ramacher <s.ramacher at gmx.at> Sat, 12 Nov 2011 15:13:27 +0100
+ -- Sebastian Ramacher <s.ramacher at gmx.at> Sat, 12 Nov 2011 16:49:11 +0100
python-crypto (2.4-1) unstable; urgency=low
Modified: packages/python-crypto/trunk/debian/patches/dont-drop-g.patch
===================================================================
--- packages/python-crypto/trunk/debian/patches/dont-drop-g.patch 2011-11-12 14:34:47 UTC (rev 19228)
+++ packages/python-crypto/trunk/debian/patches/dont-drop-g.patch 2011-11-12 16:06:09 UTC (rev 19229)
@@ -1,16 +1,28 @@
-Description: don't drop -g from the call to gcc
- The binaries will be stripped later anyway.
+Description: don't drop -g and optimization values from the call to gcc
+ The binaries will be stripped later anyway and CFLAGS contains the correct
+ flags.
Origin: Sebastian Ramacher <s.ramacher at gmx.at>
-Last-Update: 2011-10-12
+Last-Update: 2011-11-12
Forwarded: no
diff --git a/setup.py b/setup.py
-index 09fbc09..d0c6201 100644
+index cda9950..b6ae68c 100644
--- a/setup.py
+++ b/setup.py
-@@ -177,8 +177,6 @@ class PCTBuildExt (build_ext):
+@@ -166,8 +166,6 @@ class PCTBuildExt (build_ext):
+ self.__remove_compiler_option("-DNDEBUG")
+
+ # Choose our own optimization options
+- for opt in ["-O", "-O0", "-O1", "-O2", "-O3", "-Os"]:
+- self.__remove_compiler_option(opt)
+ if self.debug:
+ # Basic optimization is still needed when debugging to compile
+ # the libtomcrypt code.
+@@ -175,10 +173,7 @@ class PCTBuildExt (build_ext):
+ else:
+ # Speed up execution by tweaking compiler options. This
# especially helps the DES modules.
- self.__add_compiler_option("-O3")
+- self.__add_compiler_option("-O3")
self.__add_compiler_option("-fomit-frame-pointer")
- # Don't include debug symbols unless debugging
- self.__remove_compiler_option("-g")
Modified: packages/python-crypto/trunk/debian/rules
===================================================================
--- packages/python-crypto/trunk/debian/rules 2011-11-12 14:34:47 UTC (rev 19228)
+++ packages/python-crypto/trunk/debian/rules 2011-11-12 16:06:09 UTC (rev 19229)
@@ -11,6 +11,11 @@
pythonpath = $$(ls -d $(CURDIR)/build/lib.*-$(1))
pythonpath_dbg = $$(ls -d $(CURDIR)/build/lib_d.*-$(1) 2>/dev/null || ls -d $(CURDIR)/build/lib.*$(1)-pydebug)
+# build with -O3 (as upstream does) if noopt is not set
+ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+export DEB_CFLAGS_MAINT_APPEND=-O3
+endif
+
export CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
export CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
export LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
More information about the Python-modules-commits
mailing list