public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [PATCH] libpcre2: Fix linking with LLD linker
Date: Wed, 31 Dec 2025 15:57:52 -0800	[thread overview]
Message-ID: <20251231235752.1412954-1-raj.khem@gmail.com> (raw)

version scripts are at odds with LLD at times and its strict about undefined symbols
even though they will be provided by c startup files.

Fixes
| riscv64-yoe-linux-ld.lld: error: version script assignment of 'local' to symbol '_fini' failed: symbol not defined
| riscv64-yoe-linux-ld.lld: error: version script assignment of 'local' to symbol '_init' failed: symbol not defined
| riscv64-yoe-linux-clang: error: linker command failed with exit code 1 (use -v to see invocation)
| make[1]: *** [Makefile:1948: libpcre2-32.la] Error 1
| make[1]: Leaving directory '/mnt/b/yoe/master/build/tmp/work/riscv64imafdc-yoe-linux/libpcre2/10.47/build'

Signed-off-by: Khem Raj <raj.khem@gmail.com>

s
---
 meta/recipes-support/libpcre/libpcre2_10.47.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-support/libpcre/libpcre2_10.47.bb b/meta/recipes-support/libpcre/libpcre2_10.47.bb
index 98e3c716d6..2ac249f05b 100644
--- a/meta/recipes-support/libpcre/libpcre2_10.47.bb
+++ b/meta/recipes-support/libpcre/libpcre2_10.47.bb
@@ -39,6 +39,7 @@ EXTRA_OECONF = "\
 "
 CFLAGS += "-D_REENTRANT"
 CXXFLAGS:append:powerpc = " -lstdc++"
+LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', '-Wl,--undefined-version', '', d)}"
 
 PACKAGES =+ "libpcre2-16 libpcre2-32 pcre2grep pcre2grep-doc pcre2test pcre2test-doc"
 


                 reply	other threads:[~2025-12-31 23:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251231235752.1412954-1-raj.khem@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox