ostree: Fix build errors found with lld linker

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj
2023-06-12 14:13:14 -07:00
parent 1ae57e285b
commit 1b7c92fa9e
2 changed files with 32 additions and 0 deletions
@@ -0,0 +1,31 @@
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(-)
--- a/configure.ac
+++ b/configure.ac
@@ -243,8 +243,7 @@ AC_ARG_WITH(gpgme,
[], [with_gpgme=yes])
AS_IF([test x$with_gpgme != xno], [
have_gpgme=yes
- PKG_CHECK_MODULES([OT_DEP_GPGME], gpgme >= $LIBGPGME_DEPENDENCY, [], have_gpgme=no)
- PKG_CHECK_MODULES([OT_DEP_GPG_ERROR], [gpg-error], [], have_gpgme=no)
+ PKG_CHECK_MODULES([OT_DEP_GPGME], [gpgme >= $LIBGPGME_DEPENDENCY gpg-error], [have_gpgme=yes], [have_gpgme=no])
]
)
AS_IF([test x$with_gpgme != xno && test x$have_gpgme != xyes], [
@@ -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"