From: Khem Raj Date: Mon, 9 Nov 2020 00:02:12 +0000 (-0800) Subject: weston: Fix linking with LTO X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~9631 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5252fc88938ab3425595dcf31f892ed4aba6bc1;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git weston: Fix linking with LTO weston uses --no-undefined option during linking which does not work with LTO therefore override it with -z undefs when lto is enabled in distro Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-graphics/wayland/weston_9.0.0.bb b/meta/recipes-graphics/wayland/weston_9.0.0.bb index 75f9fb05fd7..051fd859417 100644 --- a/meta/recipes-graphics/wayland/weston_9.0.0.bb +++ b/meta/recipes-graphics/wayland/weston_9.0.0.bb @@ -26,6 +26,8 @@ REQUIRED_DISTRO_FEATURES = "opengl" DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" +LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}" + WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false"