qemu: fix snap build by disabling libudev
While building snap, static qemu is considered. Disable libudev
as it doesn't have static libraries on most of the distros of all
archs.
Fixes:
@@ -310,6 +310,11 @@ generate_qemu_options() {
qemu_options+=(size:--disable-qom-cast-debug)
qemu_options+=(size:--disable-tcmalloc)
+ # Disable libudev for static build
+ if gt_eq "${qemu_version}" "5.2.0" ; then
+ [ "${static}" == "true" ] && qemu_options+=(size:--disable-libudev)
+ fi
+
# Disallow network downloads
qemu_options+=(security:--disable-curl)
