[Build-common-hackers] Bug#695367: cdbs: qmake.mk does not forward $LDFLAGS to qmake. Makes the binary non-relro.

Nicolas Bonnefon nicolas at bonnefon.org
Fri Dec 7 14:59:31 UTC 2012

Package: cdbs
Version: 0.4.119
Severity: normal
Tags: patch

qmake.mk should forward $LDFLAGS into QMAKE_LFLAGS_RELEASE when calling qmake,
as it does for CFLAGS, CPPFLAGS...

The current version prevents any binary built with qmake.mk from inheriting the
default LDFLAGS, including the options to enable "read-only relocations". This
yields the linian error hardening-no-relro.

Patch attached.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-686-pae (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

cdbs depends on no packages.

Versions of packages cdbs recommends:
ii  autotools-dev  20120608.1

Versions of packages cdbs suggests:
ii  devscripts  2.12.6

-- no debconf information

*** /tmp/qmake_ldflags.patch
--- qmake.mk.orig       2012-12-07 14:39:31.198490476 +0000
+++ qmake.mk    2012-12-07 14:41:27.618485606 +0000
@@ -41,7 +41,7 @@
 common-configure-arch common-configure-indep:: common-configure-impl
 common-configure-impl:: $(DEB_BUILDDIR)/Makefile
-       cd $(DEB_BUILDDIR) && $(QMAKE) $(DEB_QMAKE_ARGS) $(if
+       cd $(DEB_BUILDDIR) && $(QMAKE) $(DEB_QMAKE_ARGS) $(if

More information about the Build-common-hackers mailing list