From fc6db07372f2d3f95328733f30c3cd8f2746d521 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 30 Sep 2023 16:16:02 -0700 Subject: libcgroup: Use --undefined-version with lld on sysvinit These functions are unconditionally added to libcgroup.map Fixes aarch64-yoe-linux-musl-ld.lld: error: version script assignment of 'CGROUP_3.0' to symbol 'cgroup_create_scope' failed: symbol not defined aarch64-yoe-linux-musl-ld.lld: error: version script assignment of 'CGROUP_3.0' to symbol 'cgroup_set_default_scope_opts' failed: symbol not defined aarch64-yoe-linux-musl-ld.lld: error: version script assignment of 'CGROUP_3.0' to symbol 'cgroup_create_scope2' failed: symbol not defined aarch64-yoe-linux-musl-ld.lld: error: version script assignment of 'CGROUP_3.0' to symbol 'cgroup_write_systemd_default_cgroup' failed: symbol not defined Signed-off-by: Khem Raj --- conf/nonclangable.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index f3e053b..28fd9f7 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf @@ -568,6 +568,7 @@ LDFLAGS:append:pn-libffi:x86:toolchain-clang = "${@bb.utils.contains('DISTRO_FEA LDFLAGS:append:pn-libffi:arm:toolchain-clang = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -Wl,--undefined-version', '', d)}" LDFLAGS:append:pn-elfutils:toolchain-clang = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -Wl,--undefined-version', '', d)}" LDFLAGS:append:pn-pmdk:toolchain-clang = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -Wl,--undefined-version', '', d)}" +LDFLAGS:append:pn-libcgroup:toolchain-clang = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld sysvinit', ' -Wl,--undefined-version', '', d)}" # Avoid's go linker crash as reported in https://github.com/golang/go/issues/61872 # it happens when libstd.so is linked with lld for aarch64 -- cgit v1.2.3-54-g00ecf