From: Jo-Philipp Wich Date: Thu, 5 Jan 2017 13:15:32 +0000 (+0100) Subject: tools: mkimage: use pkg-config to discover libcrypto linker flags X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=0c03650160d388f5dd83ba3e30da5d8223acf283;p=openwrt%2Fstaging%2Fblogic.git tools: mkimage: use pkg-config to discover libcrypto linker flags LibreSSL's libcrypto.so has an indirect dependency to librt for clock_gettime() on Linux. Use pkg-config to portably discover the required linker flags. Signed-off-by: Jo-Philipp Wich --- diff --git a/tools/mkimage/Makefile b/tools/mkimage/Makefile index 87aaad4f2e0b..4aa822d606a0 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)" - $(MAKE) -C $(HOST_BUILD_DIR) tools-only HOSTCFLAGS="$(HOST_CPPFLAGS) $(HOST_CFLAGS)" HOSTLDFLAGS="$(HOST_LDFLAGS)" + $(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)" endef define Host/Install