From: Jo-Philipp Wich Date: Wed, 11 Jan 2017 01:43:04 +0000 (+0100) Subject: tools: mkimage: pass crypto libraries through HOST_LOADLIBES (FS#381) X-Git-Tag: v17.01.0-rc1~154 X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fstaging%2Fchunkeey.git;a=commitdiff_plain;h=69be65b594c4fafbc4e58dd3cd235547f02a33ca tools: mkimage: pass crypto libraries through HOST_LOADLIBES (FS#381) Since linker argument order is significant on modern host compilers, pass the required libcrypto libraries through the HOST_LOADLIBES variable in order to ensure proper order of the final linker command line. Signed-off-by: Jo-Philipp Wich --- diff --git a/tools/mkimage/Makefile b/tools/mkimage/Makefile index 4aa822d606..bfe60993e2 100644 --- a/tools/mkimage/Makefile +++ b/tools/mkimage/Makefile @@ -31,8 +31,8 @@ define Host/Prepare endef define Host/Compile - $(MAKE) -C $(HOST_BUILD_DIR) defconfig HOSTCFLAGS="$(HOST_CPPFLAGS) $(HOST_CFLAGS)" HOSTLDFLAGS="$(HOST_LDFLAGS) $$$$(pkg-config --static --libs libcrypto)" - $(MAKE) -C $(HOST_BUILD_DIR) tools-only HOSTCFLAGS="$(HOST_CPPFLAGS) $(HOST_CFLAGS)" HOSTLDFLAGS="$(HOST_LDFLAGS) $$$$(pkg-config --static --libs libcrypto)" + $(MAKE) -C $(HOST_BUILD_DIR) defconfig HOSTCFLAGS="$(HOST_CPPFLAGS) $(HOST_CFLAGS)" HOSTLDFLAGS="$(HOST_LDFLAGS)" HOST_LOADLIBES="$$$$(pkg-config --static --libs libcrypto)" + $(MAKE) -C $(HOST_BUILD_DIR) tools-only HOSTCFLAGS="$(HOST_CPPFLAGS) $(HOST_CFLAGS)" HOSTLDFLAGS="$(HOST_LDFLAGS)" HOST_LOADLIBES="$$$$(pkg-config --static --libs libcrypto)" endef define Host/Install