Fix configure script to honor buildflags
authorDarshaka Pathirana <dpat@syn-net.org>
Sun, 10 Jun 2018 23:40:23 +0000 (01:40 +0200)
committerDarshaka Pathirana <dpat@syn-net.org>
Tue, 12 Jun 2018 22:54:19 +0000 (00:54 +0200)
When using the the buildflags which are exported when setting the
DPKG_EXPORT_BUILDFLAGS variable (or when trying to set some custom
buildflags manually) the build process failed with something like this:

  cc1: error: -Werror=format-security-g: no option -Wformat-security-g

This was caused by a missing whitespace when concatenating the CFLAGS
and LDFLAGS variables.

debian/patches/01-fix-configure [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/01-fix-configure b/debian/patches/01-fix-configure
new file mode 100644 (file)
index 0000000..429ee56
--- /dev/null
@@ -0,0 +1,19 @@
+--- a/src/configure
++++ b/src/configure
+@@ -153,12 +153,12 @@
+ fi
+ if [ $USE_CLANG -eq 0 ]; then
+-  CFLAGS=$CFLAGS'-g -Wall -O2'
+-  LDFLAGS=$LDFLAGS'-g -Wall -O2'
++  CFLAGS=$CFLAGS' -g -Wall -O2'
++  LDFLAGS=$LDFLAGS' -g -Wall -O2'
+   COMPILER='gcc'
+ else
+-  CFLAGS=$CFLAGS'-g -O2'
+-  LDFLAGS=$LDFLAGS'-g -O2'
++  CFLAGS=$CFLAGS' -g -O2'
++  LDFLAGS=$LDFLAGS' -g -O2'
+   COMPILER='clang'
+ fi
index e69de29..3b8949c 100644 (file)
@@ -0,0 +1 @@
+01-fix-configure