Browse Source

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 <rosenp@gmail.com>
(cherry picked from commit c61b70918b)
lilik-openwrt-22.03
Rosen Penev 2 years ago
parent
commit
d86df0df5d
2 changed files with 11 additions and 3 deletions
  1. +1
    -3
      libs/jose/Makefile
  2. +10
    -0
      libs/jose/patches/010-whole.patch

+ 1
- 3
libs/jose/Makefile View File

@ -19,15 +19,13 @@ PKG_MAINTAINER:=Tibor Dudlák <tibor.dudlak@gmail.com>
PKG_LICENSE:=Apache-2.0 PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=COPYING PKG_LICENSE_FILES:=COPYING
PKG_BUILD_DEPENDS:=openssl
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/meson.mk include $(INCLUDE_DIR)/meson.mk
define Package/jose define Package/jose
SECTION:=utils SECTION:=utils
TITLE:=Provides a full crypto stack including key generation, signing and encryption. TITLE:=Provides a full crypto stack including key generation, signing and encryption.
DEPENDS:=+jansson
DEPENDS:=+jansson +libopenssl +zlib
URL:=https://github.com/latchset/jose URL:=https://github.com/latchset/jose
endef endef


+ 10
- 0
libs/jose/patches/010-whole.patch View File

@ -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
)

Loading…
Cancel
Save