[Buildroot] [PATCH 1/1] package/qemu: fix static build

Fabrice Fontaine fontaine.fabrice at gmail.com
Fri Oct 22 06:39:25 UTC 2021


Fix the following static build failure raised since bump to version 6.1
in commit 33c69c02fb4c1176584d1e2dd336b74ed39f5d65 and
https://gitlab.com/qemu-project/qemu/-/commit/ba4dd2aabc35bc5385739e13f14e3a10a223ede0
(which enabled plugins by default):

Library dl found: YES
Checking for function "dlopen" with dependency -ldl: NO

../meson.build:460:4: ERROR: Problem encountered: dlopen not found

Fixes:
 - http://autobuild.buildroot.org/results/df447bd963e62e06b28d7230da744616ae55b194

Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
---
 package/qemu/qemu.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 31f5ab6033..f4dcf0ba5a 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -168,6 +168,10 @@ else
 QEMU_OPTS += --disable-usb-redir
 endif
 
+ifeq ($(BR2_STATIC_LIBS),y)
+QEMU_OPTS += --static
+endif
+
 # Override CPP, as it expects to be able to call it like it'd
 # call the compiler.
 define QEMU_CONFIGURE_CMDS
-- 
2.33.0



More information about the buildroot mailing list