From d86df0df5d96d9b0768b0720c59ba262613228b8 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 17 Sep 2022 15:22:53 -0700 Subject: [PATCH] jose: fix static library usage When libjose is built statically, it must use --whole-archive as it uses GCC's constructor attribute to initialize itself. Signed-off-by: Rosen Penev (cherry picked from commit c61b70918b6c10f6fd726b098474736a7e0ae9cd) --- libs/jose/Makefile | 4 +--- libs/jose/patches/010-whole.patch | 10 ++++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 libs/jose/patches/010-whole.patch diff --git a/libs/jose/Makefile b/libs/jose/Makefile index 6360a70d3..19b6c514d 100644 --- a/libs/jose/Makefile +++ b/libs/jose/Makefile @@ -19,15 +19,13 @@ PKG_MAINTAINER:=Tibor Dudlák PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=COPYING -PKG_BUILD_DEPENDS:=openssl - include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/meson.mk define Package/jose SECTION:=utils TITLE:=Provides a full crypto stack including key generation, signing and encryption. - DEPENDS:=+jansson + DEPENDS:=+jansson +libopenssl +zlib URL:=https://github.com/latchset/jose endef diff --git a/libs/jose/patches/010-whole.patch b/libs/jose/patches/010-whole.patch new file mode 100644 index 000000000..33ee9e277 --- /dev/null +++ b/libs/jose/patches/010-whole.patch @@ -0,0 +1,10 @@ +--- a/cmd/meson.build ++++ b/cmd/meson.build +@@ -22,6 +22,6 @@ executable(meson.project_name(), + 'alg.c', + 'fmt.c', + dependencies: jansson, +- link_with: libjose, ++ link_whole: libjose, + install: true + )