summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/atftp/atftp.mk7
1 files changed, 6 insertions, 1 deletions
diff --git a/package/atftp/atftp.mk b/package/atftp/atftp.mk
index 4d9a71bcd2..615b6eadbb 100644
--- a/package/atftp/atftp.mk
+++ b/package/atftp/atftp.mk
@@ -11,7 +11,12 @@ ATFTP_LICENSE_FILES = LICENSE
ATFTP_CONF_OPTS = --disable-libwrap --disable-mtftp
# For static we need to explicitly link against libpthread
ATFTP_LIBS = -lpthread
-ATFTP_CONF_ENV = LIBS="$(ATFTP_LIBS)"
+# We use CPPFLAGS for -fgnu89-inline even though it's a compiler flag
+# because atftp discards configure environment CFLAGS. -fgnu89-inline
+# is needed to avoid multiple definition error with gcc 5. See
+# https://gcc.gnu.org/gcc-5/porting_to.html.
+ATFTP_CONF_ENV = LIBS="$(ATFTP_LIBS)" \
+ CPPFLAGS="$(TARGET_CPPFLAGS) -fgnu89-inline"
ifeq ($(BR2_PACKAGE_READLINE),y)
ATFTP_DEPENDENCIES += readline
OpenPOWER on IntegriCloud