From 09465d802b8ce37ee87b6d104889059a6fa948e6 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Tue, 19 Oct 2021 11:08:46 +0200 Subject: [PATCH] u-boot.mk: always link host libraries static Host libraries are only build static, so let's pass --static to pkg-config globally and remove the then unnecessary patches doing exactly that individually. Signed-off-by: Andre Heider --- include/u-boot.mk | 1 + .../patches/210-link-libcrypto-static.patch | 14 -------------- .../patches/210-link-libcrypto-static.patch | 14 -------------- .../patches/210-link-libcrypto-static.patch | 14 -------------- 4 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 package/boot/uboot-mvebu/patches/210-link-libcrypto-static.patch delete mode 100644 package/boot/uboot-mxs/patches/210-link-libcrypto-static.patch delete mode 100644 package/boot/uboot-zynq/patches/210-link-libcrypto-static.patch diff --git a/include/u-boot.mk b/include/u-boot.mk index 8c6941b88a..509b3d76dc 100644 --- a/include/u-boot.mk +++ b/include/u-boot.mk @@ -48,6 +48,7 @@ UBOOT_MAKE_FLAGS = \ STAGING_PREFIX="$(STAGING_DIR_HOST)" \ PKG_CONFIG_PATH="$(STAGING_DIR_HOST)/lib/pkgconfig" \ PKG_CONFIG_LIBDIR="$(STAGING_DIR_HOST)/lib/pkgconfig" \ + PKG_CONFIG_EXTRAARGS="--static" \ $(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') define Build/U-Boot/Target diff --git a/package/boot/uboot-mvebu/patches/210-link-libcrypto-static.patch b/package/boot/uboot-mvebu/patches/210-link-libcrypto-static.patch deleted file mode 100644 index 2e7cf6663b..0000000000 --- a/package/boot/uboot-mvebu/patches/210-link-libcrypto-static.patch +++ /dev/null @@ -1,14 +0,0 @@ -OpenWrt links the libressl statically against mkimage, make sure all the -needed dependencies are added too. - ---- a/tools/Makefile -+++ b/tools/Makefile -@@ -168,7 +168,7 @@ ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CON - HOSTCFLAGS_kwbimage.o += \ - $(shell pkg-config --cflags libssl libcrypto 2> /dev/null || echo "") - HOSTLDLIBS_mkimage += \ -- $(shell pkg-config --libs libssl libcrypto 2> /dev/null || echo "-lssl -lcrypto") -+ $(shell pkg-config --libs --static libssl libcrypto 2> /dev/null || echo "-lssl -lpthread -lcrypto") - - # OS X deprecate openssl in favour of CommonCrypto, supress deprecation - # warnings on those systems diff --git a/package/boot/uboot-mxs/patches/210-link-libcrypto-static.patch b/package/boot/uboot-mxs/patches/210-link-libcrypto-static.patch deleted file mode 100644 index 022e798f19..0000000000 --- a/package/boot/uboot-mxs/patches/210-link-libcrypto-static.patch +++ /dev/null @@ -1,14 +0,0 @@ -OpenWrt links the libressl statically against mkimage, make sure all the -needed dependencies are added too. - ---- a/tools/Makefile -+++ b/tools/Makefile -@@ -147,7 +147,7 @@ endif - # MXSImage needs LibSSL - ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_ARMADA_38X)$(CONFIG_ARMADA_39X)$(CONFIG_FIT_SIGNATURE),) - HOSTLOADLIBES_mkimage += \ -- $(shell pkg-config --libs libssl libcrypto 2> /dev/null || echo "-lssl -lcrypto") -+ $(shell pkg-config --libs --static libssl libcrypto 2> /dev/null || echo "-lssl -lpthread -lcrypto") - - # OS X deprecate openssl in favour of CommonCrypto, supress deprecation - # warnings on those systems diff --git a/package/boot/uboot-zynq/patches/210-link-libcrypto-static.patch b/package/boot/uboot-zynq/patches/210-link-libcrypto-static.patch deleted file mode 100644 index d2e7bf168d..0000000000 --- a/package/boot/uboot-zynq/patches/210-link-libcrypto-static.patch +++ /dev/null @@ -1,14 +0,0 @@ -OpenWrt links the libressl statically against mkimage, make sure all the -needed dependencies are added too. - ---- a/tools/Makefile -+++ b/tools/Makefile -@@ -151,7 +151,7 @@ ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CON - HOSTCFLAGS_kwbimage.o += \ - $(shell pkg-config --cflags libssl libcrypto 2> /dev/null || echo "") - HOSTLOADLIBES_mkimage += \ -- $(shell pkg-config --libs libssl libcrypto 2> /dev/null || echo "-lssl -lcrypto") -+ $(shell pkg-config --libs --static libssl libcrypto 2> /dev/null || echo "-lssl -lpthread -lcrypto") - - # OS X deprecate openssl in favour of CommonCrypto, supress deprecation - # warnings on those systems -- 2.30.2