mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-04-02 02:49:12 +00:00
jansson: fix a symbol clash when building with cmake
It exports all symbols globally which results in a symbol clash, for example "hashtable_del" of ulogd2. It has been revealed because the recipe inherits cmake over autotools since Langdale. This fixes it by specifying visibility scope of symbols in its version script which matches what is given with the libtool flag '-export-symbols-regex' in Makefile.am. Signed-off-by: Jaeyoon Jung <jaeyoon.jung@lge.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
402e49afd1
commit
a519f89ea7
@ -0,0 +1,30 @@
|
||||
From e5c38614fb7e0bdbcaec6db6133fa62cfed62818 Mon Sep 17 00:00:00 2001
|
||||
From: Jaeyoon Jung <jaeyoon.jung@lge.com>
|
||||
Date: Wed, 15 Jan 2025 22:11:54 +0900
|
||||
Subject: [PATCH] Only export symbols starting with "json_" and "jansson_" for
|
||||
cmake
|
||||
|
||||
It's already done by the commit 7c707a7 and bcb6b6f, but not for cmake.
|
||||
This makes symbols in the same visibility as built with libtool.
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/akheron/jansson/pull/704]
|
||||
Signed-off-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
|
||||
---
|
||||
|
||||
CMakeLists.txt | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3394236..52b9934 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -325,6 +325,9 @@ if(JANSSON_BUILD_SHARED_LIBS)
|
||||
# some linkers may only support --version-script
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/jansson.sym" "JANSSON_${JANSSON_SOVERSION} {
|
||||
global:
|
||||
+ json_*;
|
||||
+ jansson_*;
|
||||
+ local:
|
||||
*;
|
||||
};
|
||||
")
|
||||
@ -8,6 +8,7 @@ SRC_URI = "https://github.com/akheron/${BPN}/releases/download/v${PV}/${BP}.tar.
|
||||
file://0001-Fix-overwriting-linker-flags.patch \
|
||||
file://0001-Honour-multilib-paths.patch \
|
||||
file://0001-add-back-JSON_INTEGER_IS_LONG_LONG-for-cmake.patch \
|
||||
file://0001-Only-export-symbols-starting-with-json_-and-jansson_.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "fba956f27c6ae56ce6dfd52fbf9d20254aad42821f74fa52f83957625294afb9"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user