Skip to contentSkip to conversation

libpcre2: Limit the undefined-version to non-native variants

PATCH New Khem Raj 1 participant 1 message Jan 14

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 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'

---
 meta/recipes-support/libpcre/libpcre2_10.47.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-support/libpcre/libpcre2_10.47.bb +2 -1
index 2ac249f05b..217a60aae9 100644
@@ -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"