From: Jo-Philipp Wich Date: Thu, 5 Jan 2017 13:16:57 +0000 (+0100) Subject: tools: cmake: use pkg-config to discover libcrypto linker flags X-Git-Tag: v17.01.0-rc1~255 X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=commitdiff_plain;h=f9b253147a27d4fbe2558624fc68323ff9de2f22 tools: cmake: 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/cmake/Makefile b/tools/cmake/Makefile index 9545e12d6c..13390ab967 100644 --- a/tools/cmake/Makefile +++ b/tools/cmake/Makefile @@ -21,7 +21,8 @@ include $(INCLUDE_DIR)/host-build.mk HOST_CONFIGURE_CMD := MAKEFLAGS="$(HOST_JOBS)" $(BASH) ./configure -HOST_CONFIGURE_VARS := +HOST_CONFIGURE_VARS := \ + LDFLAGS="$$$$(pkg-config --static --libs libcrypto)" HOST_CONFIGURE_ARGS := \ --prefix=$(STAGING_DIR_HOST)