[source] tools: mkimage: use pkg-config to discover libcrypto linker flags

LEDE Commits lede-commits at lists.infradead.org
Thu Jan 5 05:21:37 PST 2017


jow pushed a commit to source.git, branch master:
https://git.lede-project.org/0c03650160d388f5dd83ba3e30da5d8223acf283

commit 0c03650160d388f5dd83ba3e30da5d8223acf283
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Thu Jan 5 14:15:32 2017 +0100

    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 <jo at mein.io>
---
 tools/mkimage/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/mkimage/Makefile b/tools/mkimage/Makefile
index 87aaad4..4aa822d 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



More information about the lede-commits mailing list