[pve-devel] [PATCH v2 qemu] debian/rules: added placeholder for additional targets

Geert Stappers stappers at stappers.it
Thu Mar 1 13:29:52 CET 2018

Default behaviour of QEMU is to build for all system targets.
"system target" is a CPU architecture.
Proxmox builds only for the host arch, which boils down to only allowing x86.
So also only allowing x86 guests.

For supporting other CPU architectures, needs the target list to be expanded.

How to expand the target list is not obvious.
Questions arise which list seperator to use.
With this "placeholder" is documented how to add additional targets.

No real code change, just preparing for build change.

Signed-off-by: Geert Stappers <stappers at stappers.it>
 debian/rules |   16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index 4209404..f975bd6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,6 +17,20 @@ DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 ARCH ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
+# empty target-list defaults to building all targets
+TRGTS +=--target-list=\"
+TRGTS +=$(ARCH)-softmmu
+# for build host
+# next placeholder for additional targets
+#TRGTS +=arm-softmmu
+#TRGTS +=aarch64-softmmu
+#TRGTS +=mips-softmmu
+#TRGTS +=mipsel-softmmu
+TRGTS +=\"
+TRGTLST =$(shell echo $(TRGTS))
+# to get rid of the backslashes
 destdir := $(CURDIR)/debian/$(PACKAGE)
@@ -37,7 +51,7 @@ config.status: configure
 	# Add here commands to configure the package.
 	# guest-agent is only required for guest systems
-	./configure --with-confsuffix="/kvm" --target-list=$(ARCH)-softmmu \
+	./configure --with-confsuffix="/kvm" $(TRGTLST) \
 	--prefix=/usr --datadir=/usr/share \
 	--docdir=/usr/share/doc/pve-qemu-kvm \
 	--sysconfdir=/etc --localstatedir=/var --disable-xen --enable-gnutls \

More information about the pve-devel mailing list