From: Darshaka Pathirana Date: Sun, 10 Jun 2018 23:40:23 +0000 (+0200) Subject: Fix configure script to honor buildflags X-Git-Tag: v0.3.7-1~5 X-Git-Url: https://git.syn-net.org/?p=debian%2Fuanytun.git;a=commitdiff_plain;h=947d3e8728be9aa18cac56692e5773b9a09f9f00 Fix configure script to honor buildflags 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. --- diff --git a/debian/patches/01-fix-configure b/debian/patches/01-fix-configure new file mode 100644 index 0000000..429ee56 --- /dev/null +++ b/debian/patches/01-fix-configure @@ -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 + diff --git a/debian/patches/series b/debian/patches/series index e69de29..3b8949c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -0,0 +1 @@ +01-fix-configure