From: Khem Raj Date: Wed, 14 Jan 2026 00:35:53 +0000 (-0800) Subject: libpcre2: Limit the undefined-version to non-native variants X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32dfd182093688b402ba91e5f9a709f6f86d068f;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git libpcre2: Limit the undefined-version to non-native variants Native variant maybe built with GNU linker which does not recognize. Fixes build on ubuntu 22.04 /home/kraj200/yoe/build/tmp/hosttools/ld: unrecognized option '--undefined-version' Signed-off-by: Khem Raj Signed-off-by: Antonin Godard Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-support/libpcre/libpcre2_10.47.bb b/meta/recipes-support/libpcre/libpcre2_10.47.bb index 2ac249f05b..217a60aae9 100644 --- a/meta/recipes-support/libpcre/libpcre2_10.47.bb +++ b/meta/recipes-support/libpcre/libpcre2_10.47.bb @@ -39,7 +39,8 @@ EXTRA_OECONF = "\ " CFLAGS += "-D_REENTRANT" CXXFLAGS:append:powerpc = " -lstdc++" -LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', '-Wl,--undefined-version', '', d)}" +LDFLAGS:append:class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', '-Wl,--undefined-version', '', d)}" +LDFLAGS:append:class-nativesdk = " ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', '-Wl,--undefined-version', '', d)}" PACKAGES =+ "libpcre2-16 libpcre2-32 pcre2grep pcre2grep-doc pcre2test pcre2test-doc"