diff mbox series

[meta-oe,1/3] ostree: Fix build errors found with lld linker

Message ID 20230613042312.696835-1-raj.khem@gmail.com
State New
Headers show
Series [meta-oe,1/3] ostree: Fix build errors found with lld linker | expand

Commit Message

Khem Raj June 13, 2023, 4:23 a.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...ith-libgpg-error-for-gpg_strerror_r-.patch | 35 +++++++++++++++++++
 .../recipes-extended/ostree/ostree_2023.3.bb  |  1 +
 2 files changed, 36 insertions(+)
 create mode 100644 meta-oe/recipes-extended/ostree/ostree/0001-libostree-Link-with-libgpg-error-for-gpg_strerror_r-.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-extended/ostree/ostree/0001-libostree-Link-with-libgpg-error-for-gpg_strerror_r-.patch b/meta-oe/recipes-extended/ostree/ostree/0001-libostree-Link-with-libgpg-error-for-gpg_strerror_r-.patch
new file mode 100644
index 0000000000..167d8ffdd8
--- /dev/null
+++ b/meta-oe/recipes-extended/ostree/ostree/0001-libostree-Link-with-libgpg-error-for-gpg_strerror_r-.patch
@@ -0,0 +1,35 @@ 
+From 597120777ff9410b715c19298df824ce3170d6d7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 12 Jun 2023 14:04:44 -0700
+Subject: [PATCH] libostree: Link with libgpg-error for gpg_strerror_r API
+
+With f461c02bb55bf2853a3b81ed5c8618040ab54e98 use of gpg_strerror_r
+was added this symbol comes from libgpg-error however, therefore its
+needed to add -lgpg-error to cmdline to resolve this symbol especially
+with gold and lld linker. Fixes
+
+aarch64-yoe-linux-ld.lld: error: undefined reference due to --no-allow-shlib-undefined: gpg_strerror_r
+>>> referenced by ./.libs/libostree-1.so
+
+Upstream-Status: Submitted [https://github.com/ostreedev/ostree/pull/2880]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile-libostree.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile-libostree.am b/Makefile-libostree.am
+index 8edd7f4d..4ad1eed5 100644
+--- a/Makefile-libostree.am
++++ b/Makefile-libostree.am
+@@ -191,7 +191,7 @@ libostree_1_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/bsdiff -I$(srcdir)/libglnx -I$(
+ 	-DPKGLIBEXECDIR=\"$(pkglibexecdir)\"
+ libostree_1_la_LDFLAGS = -version-number 1:0:0 -Bsymbolic-functions $(addprefix $(wl_versionscript_arg),$(symbol_files))
+ libostree_1_la_LIBADD = libotutil.la libglnx.la libbsdiff.la $(OT_INTERNAL_GIO_UNIX_LIBS) $(OT_INTERNAL_GPGME_LIBS) \
+-                        $(OT_DEP_LZMA_LIBS) $(OT_DEP_ZLIB_LIBS) $(OT_DEP_CRYPTO_LIBS)
++                        $(OT_DEP_LZMA_LIBS) $(OT_DEP_ZLIB_LIBS) $(OT_DEP_CRYPTO_LIBS) $(OT_DEP_GPG_ERROR_LIBS)
+ # Some change between rust-1.21.0-1.fc27 and rust-1.22.1-1.fc27.x86_64
+ libostree_1_la_LIBADD += $(bupsplitpath)
+ EXTRA_libostree_1_la_DEPENDENCIES = $(symbol_files)
+-- 
+2.41.0
+
diff --git a/meta-oe/recipes-extended/ostree/ostree_2023.3.bb b/meta-oe/recipes-extended/ostree/ostree_2023.3.bb
index dc771ce28a..f5cd7d6ac6 100644
--- a/meta-oe/recipes-extended/ostree/ostree_2023.3.bb
+++ b/meta-oe/recipes-extended/ostree/ostree_2023.3.bb
@@ -21,6 +21,7 @@  DEPENDS = " \
 GITHUB_BASE_URI = "https://github.com/ostreedev/ostree/releases"
 SRC_URI = " \
     ${GITHUB_BASE_URI}/download/v${PV}/libostree-${PV}.tar.xz \
+    file://0001-libostree-Link-with-libgpg-error-for-gpg_strerror_r-.patch \
     file://run-ptest \
 "
 SRC_URI[sha256sum] = "9c575a094da2c307769f0aee15de95470c3b5550cbff211fbbc4f6fc75f333b1"