diff options
author | John Helmert III <ajak@gentoo.org> | 2021-10-10 22:46:10 -0500 |
---|---|---|
committer | John Helmert III <ajak@gentoo.org> | 2021-10-10 22:47:42 -0500 |
commit | 41a325ea429a98833868c9370f5ee2c7af540477 (patch) | |
tree | 1f1a110f85eecd387402c4f2b48817c06c3b2a8f /app-emulation/qemu | |
parent | dev-perl/Regexp-Util: Stabilize 0.5.0 x86, #817503 (diff) | |
download | gentoo-41a325ea429a98833868c9370f5ee2c7af540477.tar.gz gentoo-41a325ea429a98833868c9370f5ee2c7af540477.tar.bz2 gentoo-41a325ea429a98833868c9370f5ee2c7af540477.zip |
app-emulation/qemu: fix build failure when libbpf is present
Closes: https://bugs.gentoo.org/814458
Signed-off-by: John Helmert III <ajak@gentoo.org>
Diffstat (limited to 'app-emulation/qemu')
-rw-r--r-- | app-emulation/qemu/files/qemu-6.1.0-automagic-libbpf.patch | 21 | ||||
-rw-r--r-- | app-emulation/qemu/metadata.xml | 1 | ||||
-rw-r--r-- | app-emulation/qemu/qemu-6.1.0.ebuild | 5 |
3 files changed, 26 insertions, 1 deletions
diff --git a/app-emulation/qemu/files/qemu-6.1.0-automagic-libbpf.patch b/app-emulation/qemu/files/qemu-6.1.0-automagic-libbpf.patch new file mode 100644 index 000000000000..d067650dc8fa --- /dev/null +++ b/app-emulation/qemu/files/qemu-6.1.0-automagic-libbpf.patch @@ -0,0 +1,21 @@ +commit 080832e4f4801a28bd1170c49e61f6a0f5f05d03 +Author: Paolo Bonzini <pbonzini@redhat.com> +Date: Tue Sep 7 12:45:12 2021 +0200 + + ebpf: only include in system emulators + + eBPF files are being included in user emulators, which is useless and + also breaks compilation because ebpf/trace-events is only processed + if a system emulator is included in the build. + + Resolves: https://gitlab.com/qemu-project/qemu/-/issues/566 + Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> + Signed-off-by: Jason Wang <jasowang@redhat.com> + +diff --git a/ebpf/meson.build b/ebpf/meson.build +index 9cd0635370..2dd0fd8948 100644 +--- a/ebpf/meson.build ++++ b/ebpf/meson.build +@@ -1 +1 @@ +-common_ss.add(when: libbpf, if_true: files('ebpf_rss.c'), if_false: files('ebpf_rss-stub.c')) ++softmmu_ss.add(when: libbpf, if_true: files('ebpf_rss.c'), if_false: files('ebpf_rss-stub.c')) diff --git a/app-emulation/qemu/metadata.xml b/app-emulation/qemu/metadata.xml index 6cc5daac8dcd..094f223846c3 100644 --- a/app-emulation/qemu/metadata.xml +++ b/app-emulation/qemu/metadata.xml @@ -17,6 +17,7 @@ <flag name="accessibility">Adds support for braille displays using brltty</flag> <flag name="aio">Enables support for Linux's Async IO</flag> <flag name="alsa">Enable alsa output for sound emulation</flag> + <flag name="bpf">Enable eBPF support for RSS implementation.</flag> <flag name="capstone">Enable disassembly support with <pkg>dev-libs/capstone</pkg></flag> <flag name="curl">Support ISOs / -cdrom directives via HTTP or HTTPS.</flag> <flag name="fdt">Enables firmware device tree support</flag> diff --git a/app-emulation/qemu/qemu-6.1.0.ebuild b/app-emulation/qemu/qemu-6.1.0.ebuild index 8365c047729d..15cd2a1d2944 100644 --- a/app-emulation/qemu/qemu-6.1.0.ebuild +++ b/app-emulation/qemu/qemu-6.1.0.ebuild @@ -32,7 +32,7 @@ HOMEPAGE="https://www.qemu.org https://www.linux-kvm.org" LICENSE="GPL-2 LGPL-2 BSD-2" SLOT="0" -IUSE="accessibility +aio alsa bzip2 capstone +caps +curl debug +doc +IUSE="accessibility +aio alsa bpf bzip2 capstone +caps +curl debug +doc +fdt fuse glusterfs gnutls gtk infiniband iscsi io-uring jack jemalloc +jpeg kernel_linux kernel_FreeBSD lzo multipath @@ -142,6 +142,7 @@ SOFTMMU_TOOLS_DEPEND=" ) aio? ( dev-libs/libaio[static-libs(+)] ) alsa? ( >=media-libs/alsa-lib-1.0.13 ) + bpf? ( dev-libs/libbpf:= ) bzip2? ( app-arch/bzip2[static-libs(+)] ) capstone? ( dev-libs/capstone:= ) caps? ( sys-libs/libcap-ng[static-libs(+)] ) @@ -276,6 +277,7 @@ PATCHES=( "${FILESDIR}"/${PN}-5.2.0-disable-keymap.patch "${FILESDIR}"/${PN}-6.0.0-make.patch "${FILESDIR}"/${PN}-6.1.0-strings.patch + "${FILESDIR}"/${P}-automagic-libbpf.patch ) QA_PREBUILT=" @@ -501,6 +503,7 @@ qemu_src_configure() { conf_opts+=( $(conf_notuser accessibility brlapi) $(conf_notuser aio linux-aio) + $(conf_softmmu bpf) $(conf_notuser bzip2) $(conf_notuser capstone) $(conf_notuser caps cap-ng) |