diff mbox series

[meta-networking,2/3] spice-gtk: Fix build with lld linker

Message ID 20230613042312.696835-2-raj.khem@gmail.com
State New
Headers show
Series [meta-oe,1/3] ostree: Fix build errors found with lld linker | expand

Commit Message

Khem Raj June 13, 2023, 4:23 a.m. UTC
lld flags errors when checking for --version-script linker option since
the export file specifies symbols which do not exist during link, so in
a way it is right, however bfd linker works fine and ignores this error.

perhaps the meson check should be improved but until them lets add
--undefined-version option to linker when using lld

Fixes
aarch64-yoe-linux-ld.lld: error: TOPDIR/build/tmp/work/cortexa72-cortexa53-crypto-mx8-yoe-linux/spice-gtk/0.42-r0/git/src/spice-glib-sym-file:1: unknown directive: spice_audio_get
>>> spice_audio_get
>>> ^

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-networking/recipes-support/spice/spice-gtk_0.42.bb | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/meta-networking/recipes-support/spice/spice-gtk_0.42.bb b/meta-networking/recipes-support/spice/spice-gtk_0.42.bb
index 542ddb69b7..27504392a6 100644
--- a/meta-networking/recipes-support/spice/spice-gtk_0.42.bb
+++ b/meta-networking/recipes-support/spice/spice-gtk_0.42.bb
@@ -55,4 +55,6 @@  PACKAGECONFIG[vapi] = "-Dvapi=enabled,-Dvapi=disabled"
 EXTRA_OEMESON = "-Dpie=true"
 EXTRA_OEMESON:append:libc-musl = " -Dcoroutine=libucontext"
 
+LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -Wl,--undefined-version', '', d)}"
+
 FILES:${PN} += "${datadir}"