libpcre2: Limit the undefined-version to non-native variants
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'
Signed-off-by Khem Raj <[email protected]>
--- 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
@@ -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"