From 34f152de14f803fcfe5c92c515bf585838bba10a Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Sun, 6 Feb 2022 12:56:02 +0100 Subject: [PATCH] qemu: replace a gtk wrapper with directly setting environment from runqemu The wrapper is executed by host bash, and host bash refuses to run when pseudo libc is preloaded via LD_PRELOAD (which is the case when gl is enabled). Only the fontconfig setting is carried over as local testing showed that only that is necessary for the gui to look ok nowadays; adjust further if necessary. Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- meta/recipes-devtools/qemu/qemu-native.inc | 4 ---- meta/recipes-devtools/qemu/qemu.inc | 11 ----------- meta/recipes-devtools/qemu/qemu_6.2.0.bb | 4 ---- scripts/runqemu | 1 + 4 files changed, 1 insertion(+), 19 deletions(-) diff --git a/meta/recipes-devtools/qemu/qemu-native.inc b/meta/recipes-devtools/qemu/qemu-native.inc index 5d3ba3486c1..d9acc613f95 100644 --- a/meta/recipes-devtools/qemu/qemu-native.inc +++ b/meta/recipes-devtools/qemu/qemu-native.inc @@ -5,7 +5,3 @@ inherit native EXTRA_OEMAKE:append = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'" LDFLAGS:append = " -fuse-ld=bfd" - -do_install:append() { - ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} -} diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index 843de3337a5..325118cfb36 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc @@ -138,17 +138,6 @@ do_install:append() { } # END of qemu-mips workaround -make_qemu_wrapper() { - gdk_pixbuf_module_file=`pkg-config --variable=gdk_pixbuf_cache_file gdk-pixbuf-2.0` - - for tool in `ls ${D}${bindir}/qemu-system-*`; do - create_wrapper $tool \ - GDK_PIXBUF_MODULE_FILE=$gdk_pixbuf_module_file \ - FONTCONFIG_PATH=/etc/fonts \ - GTK_THEME=Adwaita - done -} - # Disable kvm/virgl/mesa on targets that do not support it PACKAGECONFIG:remove:darwin = "kvm virglrenderer glx gtk+" PACKAGECONFIG:remove:mingw32 = "kvm virglrenderer glx gtk+" diff --git a/meta/recipes-devtools/qemu/qemu_6.2.0.bb b/meta/recipes-devtools/qemu/qemu_6.2.0.bb index c9a53e3b05b..062ed32b015 100644 --- a/meta/recipes-devtools/qemu/qemu_6.2.0.bb +++ b/meta/recipes-devtools/qemu/qemu_6.2.0.bb @@ -12,10 +12,6 @@ EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" -do_install:append:class-nativesdk() { - ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} -} - PACKAGECONFIG ??= " \ fdt sdl kvm pie \ ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \ diff --git a/scripts/runqemu b/scripts/runqemu index 4e05c1bb15b..07429372ea7 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -1369,6 +1369,7 @@ class BaseConfig(object): if self.sdl == True: self.qemu_opt += 'sdl,' elif self.gtk == True: + os.environ['FONTCONFIG_PATH'] = '/etc/fonts' self.qemu_opt += 'gtk,' if self.gl == True: -- 2.47.3