dropbear: fix accidental reset of supplied CFLAGS
authorKonstantin Demin <rockdrilla@gmail.com>
Tue, 16 Oct 2018 13:31:30 +0000 (16:31 +0300)
committerHans Dedecker <dedeckeh@gmail.com>
Thu, 8 Nov 2018 10:07:04 +0000 (11:07 +0100)
compiler complains about messed up CFLAGS in build log:
    cc1: note: someone does not honour COPTS correctly, passed 0 times

cherry-pick upstream commit 8d0b48f16550c9bf3693b2fa683f21e8276b1b1a

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
package/network/services/dropbear/Makefile
package/network/services/dropbear/patches/001-configure-cflags.patch [new file with mode: 0644]

index ee98ef6617adbed57462d0be5d6325a792f66618..cb4b3d8b5eeccf93adbdbfa95dcb7ed862a2f178 100644 (file)
@@ -23,6 +23,7 @@ PKG_CPE_ID:=cpe:/a:matt_johnston:dropbear_ssh_server
 
 PKG_BUILD_PARALLEL:=1
 PKG_USE_MIPS16:=0
+PKG_FIXUP:=autoreconf
 
 PKG_CONFIG_DEPENDS:= \
        CONFIG_TARGET_INIT_PATH CONFIG_DROPBEAR_ECC \
diff --git a/package/network/services/dropbear/patches/001-configure-cflags.patch b/package/network/services/dropbear/patches/001-configure-cflags.patch
new file mode 100644 (file)
index 0000000..e29cf89
--- /dev/null
@@ -0,0 +1,19 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -9,6 +9,7 @@ AC_PREREQ(2.59)
+ AC_INIT
+ AC_CONFIG_SRCDIR(buffer.c)
++ORIGCFLAGS="$CFLAGS"
+ # Checks for programs.
+ AC_PROG_CC
+@@ -29,7 +30,7 @@ AC_DEFUN(DB_TRYADDCFLAGS,
+ }])
+ # set compile flags prior to other tests
+-if test -z "$OLDCFLAGS" && test "$GCC" = "yes"; then
++if test -z "$ORIGCFLAGS" && test "$GCC" = "yes"; then
+       AC_MSG_NOTICE(No \$CFLAGS set... using "-Os -W -Wall" for GCC)
+       CFLAGS="-Os -W -Wall"
+ fi