mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-libs/jansson: reapply dropped patch
This was never merged and is still required for lld, modified so that symbols match as upstream hid symbols later on. Signed-off-by: Alfred Wingate <parona@protonmail.com> Part-of: https://github.com/gentoo/gentoo/pull/42239 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
Sam James
parent
35ba220358
commit
541d2f9875
@@ -0,0 +1,62 @@
|
||||
https://github.com/akheron/jansson/issues/715
|
||||
|
||||
Modified https://github.com/akheron/jansson/pull/666 with lessons taken from https://github.com/akheron/jansson/pull/704.
|
||||
|
||||
From https://github.com/akheron/jansson/pull/666/commits/1e2ac681e5f39fc7a7e8b8deb2162a93976d4622 Mon Sep 17 00:00:00 2001
|
||||
From: Violet Purcell <vimproved@inventati.org>
|
||||
Date: Wed, 11 Oct 2023 20:51:57 -0400
|
||||
Subject: [PATCH] Port check for --default-symver to autoconf
|
||||
|
||||
This commit ports the configure check for -Wl,--default-symver that is
|
||||
present in CMake to autoconf. This fixes building Jansson via autoconf
|
||||
with non-bfd linkers on glibc systems.
|
||||
|
||||
Signed-off-by: Violet Purcell <vimproved@inventati.org>
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -25,6 +25,9 @@ AC_TYPE_UINT16_T
|
||||
AC_TYPE_UINT8_T
|
||||
AC_TYPE_LONG_LONG_INT
|
||||
|
||||
+jansson_soversion="4"
|
||||
+AC_SUBST([jansson_soversion])
|
||||
+
|
||||
AC_C_INLINE
|
||||
case $ac_cv_c_inline in
|
||||
yes) json_inline=inline;;
|
||||
@@ -138,8 +141,12 @@ AS_IF([test "x$with_Bsymbolic" = "xyes"], [JSON_BSYMBOLIC_LDFLAGS=-Wl[,]-Bsymbol
|
||||
AC_SUBST(JSON_BSYMBOLIC_LDFLAGS)
|
||||
|
||||
# Enable symbol versioning on GNU libc
|
||||
+m4_pattern_forbid([^AX_CHECK_LINK_FLAG$])
|
||||
JSON_SYMVER_LDFLAGS=
|
||||
-AC_CHECK_DECL([__GLIBC__], [JSON_SYMVER_LDFLAGS=-Wl,--default-symver])
|
||||
+AC_CHECK_DECL([__GLIBC__],
|
||||
+ [AX_CHECK_LINK_FLAG([-Wl,--default-symver],
|
||||
+ [JSON_SYMVER_LDFLAGS=-Wl,--default-symver],
|
||||
+ [JSON_SYMVER_LDFLAGS=-Wl,--version-script,$ac_abs_confdir/jansson.sym])])
|
||||
AC_SUBST([JSON_SYMVER_LDFLAGS])
|
||||
|
||||
AC_ARG_ENABLE([ossfuzzers],
|
||||
@@ -168,6 +175,7 @@ AC_SUBST([AM_CFLAGS])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
jansson.pc
|
||||
+ jansson.sym
|
||||
Makefile
|
||||
doc/Makefile
|
||||
src/Makefile
|
||||
--- /dev/null
|
||||
+++ b/jansson.sym.in
|
||||
@@ -0,0 +1,8 @@
|
||||
+JANSSON_@jansson_soversion@ {
|
||||
+ global:
|
||||
+ json_*;
|
||||
+ jansson_*;
|
||||
+ local:
|
||||
+ *;
|
||||
+};
|
||||
+
|
||||
--
|
||||
2.42.0
|
||||
|
||||
@@ -19,6 +19,10 @@ BDEPEND="
|
||||
doc? ( dev-python/sphinx )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/jansson-2.14.1-default-symver-test.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
eautoreconf
|
||||
|
||||
Reference in New Issue
Block a user