[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#703466: apr: builds without $CFLAGS, only with $H_CFLAGS



Source: apr
Version: 1.4.6-3
Severity: important
Tags: patch

d/rules currently passes CFLAGS and LDFLAGS to configure. However,
the invocation of make overrides CFLAGS and LDFLAGS with H_FLAGS and
H_LDFLAGS, thus only $H_FLAGS and $H_LDFLAGS are used to compile apr.
$CFLAGS and $LDFLAGS are ignored. Consequently, apr is built without
-O2 and -g.

The attached patch uses both ${C,LD}FLAGS and $H_{C,LD}FLAGS to build
the package.

Regards
-- 
Sebastian Ramacher
diff -Nru apr-1.4.6/debian/rules apr-1.4.6/debian/rules
--- apr-1.4.6/debian/rules	2012-05-19 16:06:37.000000000 +0200
+++ apr-1.4.6/debian/rules	2013-03-20 00:21:08.000000000 +0100
@@ -68,7 +68,7 @@
 	# we need to force the use of bash here. Otherwise, if apr is built with
 	# /bin/sh -> /bin/bash, the resulting libtool will not work on systems
 	# where /bin/sh -> /bin/dash
-	cd $(BUILDDIR) && CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" $(CONFFLAGS) CONFIG_SHELL=/bin/bash /bin/bash ../configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --enable-layout=Debian --includedir=\$${prefix}/usr/include/apr-1.0 --with-installbuilddir=\$${prefix}/usr/share/apr-1.0/build  --enable-nonportable-atomics --enable-allocator-uses-mmap
+	cd $(BUILDDIR) && CFLAGS="$(CFLAGS) $(H_CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS) $(H_LDFLAGS)" $(CONFFLAGS) CONFIG_SHELL=/bin/bash /bin/bash ../configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --enable-layout=Debian --includedir=\$${prefix}/usr/include/apr-1.0 --with-installbuilddir=\$${prefix}/usr/share/apr-1.0/build  --enable-nonportable-atomics --enable-allocator-uses-mmap
 	# Determine whether upstream's configure gives the same definition of apr_ino_t as we had until 1.2.11-1
 	rm -f debian/ino_t_test
 	gcc -I$(CURDIR)/include -I$(BUILDDIR)/include `$(BUILDDIR)/apr-1-config --cppflags` -o debian/ino_t_test debian/ino_t_test.c
@@ -100,7 +100,7 @@
 build-stamp: $(BUILDDIR)/config.status
 	dh_testdir
 
-	$(MAKE) -C $(BUILDDIR) CFLAGS="$(H_CFLAGS)" LDFLAGS="$(H_LDFLAGS)"
+	$(MAKE) -C $(BUILDDIR)
 	$(MAKE) -C $(BUILDDIR) dox
 
 	touch $@
@@ -125,7 +125,7 @@
 
 test-stamp: build
 	dh_testdir
-	$(MAKE) -C $(BUILDDIR)/test all CFLAGS="$(H_CFLAGS)" LDFLAGS="$(H_LDFLAGS)"
+	$(MAKE) -C $(BUILDDIR)/test all
 	cd $(BUILDDIR)/test && ./testall -v testsockets testsock || $(IGNORE_TESTSOCK)
 	cd $(BUILDDIR)/test && ( ulimit -S -s 8192 ; ./testall -v testatomic)
 	cd $(BUILDDIR)/test && ./testall -v -x testsockets testsock testatomic

Attachment: signature.asc
Description: Digital signature


Reply to: