From 0c03650160d388f5dd83ba3e30da5d8223acf283 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 5 Jan 2017 14:15:32 +0100 Subject: [PATCH] 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 --- tools/mkimage/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/mkimage/Makefile b/tools/mkimage/Makefile index 87aaad4f2e..4aa822d606 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 -- 2.30.2