aboutsummaryrefslogtreecommitdiffstats
path: root/emulators
diff options
context:
space:
mode:
authornox <nox@FreeBSD.org>2012-06-28 01:27:39 +0800
committernox <nox@FreeBSD.org>2012-06-28 01:27:39 +0800
commit722522ff50375e60f5bf2e6ccd86b86690ef93d1 (patch)
treecc8c3d668784f13d30a08de40e63c3c806075f31 /emulators
parent0638380ef2e91b2a98b915931f92d644ab69e67c (diff)
downloadfreebsd-ports-gnome-722522ff50375e60f5bf2e6ccd86b86690ef93d1.tar.gz
freebsd-ports-gnome-722522ff50375e60f5bf2e6ccd86b86690ef93d1.tar.zst
freebsd-ports-gnome-722522ff50375e60f5bf2e6ccd86b86690ef93d1.zip
- Replace ALL_TARGETS knob by two new knobs, BSD_USER and X86_TARGETS
to allow only building x86 targets again. - Add knob to enable the clang workaround, this is a knob to make sure users read about the disadvantages. (result is slow and less stable) - No PORTREVISION bump as the default installed bits don't change.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/qemu-devel/Makefile40
-rw-r--r--emulators/qemu-devel/pkg-plist50
2 files changed, 60 insertions, 30 deletions
diff --git a/emulators/qemu-devel/Makefile b/emulators/qemu-devel/Makefile
index ec950c64eb93..affe89c3d82a 100644
--- a/emulators/qemu-devel/Makefile
+++ b/emulators/qemu-devel/Makefile
@@ -32,7 +32,7 @@ CONFLICTS_INSTALL= qemu-[0-9]*
MAKE_JOBS_SAFE= yes
OPTIONS_DEFINE= SAMBA SDL OPENGL GNUTLS SASL JPEG PNG CURL CDROM_DMA PCAP \
- USBREDIR GNS3 ADD_AUDIO ALL_TARGETS
+ USBREDIR GNS3 ADD_AUDIO CLANG X86_TARGETS BSD_USER
SAMBA_DESC= samba dependency (for -smb)
GNUTLS_DESC= gnutls dependency (vnc encryption)
SASL_DESC= cyrus-sasl dependency (vnc encryption)
@@ -45,7 +45,9 @@ SEABIOS_GIT_DESC= add seabios snapshot (-bios bios.bin-1.6.3.1)
USBREDIR_DESC= usb device network redirection (experimental!)
GNS3_DESC= gns3 patches (udp, promiscuous multicast)
ADD_AUDIO_DESC= Emulate more audio hardware (experimental!)
-ALL_TARGETS_DESC= Also build bsd-user targets (for testing)
+CLANG_DESC= clang workaround (result slow and less stable!)
+X86_TARGETS_DESC= Don't build non-x86 system targets
+BSD_USER_DESC= Also build bsd-user targets (for testing)
OPTIONS_DEFAULT=SDL OPENGL GNUTLS SASL JPEG PNG CURL CDROM_DMA PCAP
.include <bsd.port.options.mk>
@@ -53,16 +55,41 @@ OPTIONS_DEFAULT=SDL OPENGL GNUTLS SASL JPEG PNG CURL CDROM_DMA PCAP
CONFIGURE_ARGS+= --extra-ldflags=-L${LOCALBASE}/lib
PORTDOCS= docs qemu-doc.html qemu-tech.html
-.if empty(PORT_OPTIONS:MALL_TARGETS)
+# XXX this fixes build with clang but --enable-tcg-interpreter that's
+# needed to avoid global register usage that clang doesn't support
+# causes the result to be slow and less stable.
+.if ${PORT_OPTIONS:MCLANG}
+CONFIGURE_ARGS+= --enable-tcg-interpreter
+CLANG_CFLAGS_AS+= -no-integrated-as
+.endif
+
+.if ${PORT_OPTIONS:MX86_TARGETS}
+.if ${PORT_OPTIONS:MBSD_USER}
+CONFIGURE_ARGS+= --target-list=i386-softmmu,x86_64-softmmu,i386-bsd-user,x86_64-bsd-user,sparc-bsd-user,sparc64-bsd-user
+.else
+CONFIGURE_ARGS+= --target-list=i386-softmmu,x86_64-softmmu
+.endif
+.else
+.if empty(PORT_OPTIONS:MBSD_USER)
CONFIGURE_ARGS+= --disable-bsd-user
-PLIST_SUB+= ALLTARGETS="@comment "
+.endif
+.endif
+
+.if empty(PORT_OPTIONS:MBSD_USER)
+PLIST_SUB+= BSD_USER="@comment "
.else
-PLIST_SUB+= ALLTARGETS=""
+PLIST_SUB+= BSD_USER=""
.if ${ARCH} == "sparc64"
IGNORE= bsd-user targets not tested on sparc64
.endif
.endif
+.if ${PORT_OPTIONS:MX86_TARGETS}
+PLIST_SUB+= NONX86="@comment "
+.else
+PLIST_SUB+= NONX86=""
+.endif
+
.if ${PORT_OPTIONS:MGNS3}
EXTRA_PATCHES+= ${FILESDIR}/hw_e1000_c.patch \
${FILESDIR}/net_c.patch \
@@ -191,6 +218,9 @@ post-patch:
-e "s|^(LDFLAGS=).*|\1${LDFLAGS}|" \
${WRKSRC}/Makefile
@${REINPLACE_CMD} -E \
+ -e "s|^(CFLAGS[ ]*:=.*)|\1 ${CLANG_CFLAGS_AS}|" \
+ ${WRKSRC}/pc-bios/optionrom/Makefile
+ @${REINPLACE_CMD} -E \
-e "1s|^(#! )/usr/bin/perl|\1${PERL}|" \
${WRKSRC}/scripts/texi2pod.pl
diff --git a/emulators/qemu-devel/pkg-plist b/emulators/qemu-devel/pkg-plist
index f00f27564774..56e161cfe25e 100644
--- a/emulators/qemu-devel/pkg-plist
+++ b/emulators/qemu-devel/pkg-plist
@@ -2,33 +2,33 @@ bin/qemu-ga
bin/qemu-img
bin/qemu-io
bin/qemu-nbd
-bin/qemu-system-alpha
-bin/qemu-system-arm
-bin/qemu-system-cris
+%%NONX86%%bin/qemu-system-alpha
+%%NONX86%%bin/qemu-system-arm
+%%NONX86%%bin/qemu-system-cris
bin/qemu-system-i386
-bin/qemu-system-lm32
-bin/qemu-system-m68k
-bin/qemu-system-microblaze
-bin/qemu-system-microblazeel
-bin/qemu-system-mips
-bin/qemu-system-mips64
-bin/qemu-system-mips64el
-bin/qemu-system-mipsel
-bin/qemu-system-ppc
-bin/qemu-system-ppc64
-bin/qemu-system-ppcemb
-bin/qemu-system-s390x
-bin/qemu-system-sh4
-bin/qemu-system-sh4eb
-bin/qemu-system-sparc
-bin/qemu-system-sparc64
-%%ALLTARGETS%%bin/qemu-i386
-%%ALLTARGETS%%bin/qemu-sparc
-%%ALLTARGETS%%bin/qemu-sparc64
-%%ALLTARGETS%%bin/qemu-x86_64
+%%NONX86%%bin/qemu-system-lm32
+%%NONX86%%bin/qemu-system-m68k
+%%NONX86%%bin/qemu-system-microblaze
+%%NONX86%%bin/qemu-system-microblazeel
+%%NONX86%%bin/qemu-system-mips
+%%NONX86%%bin/qemu-system-mips64
+%%NONX86%%bin/qemu-system-mips64el
+%%NONX86%%bin/qemu-system-mipsel
+%%NONX86%%bin/qemu-system-ppc
+%%NONX86%%bin/qemu-system-ppc64
+%%NONX86%%bin/qemu-system-ppcemb
+%%NONX86%%bin/qemu-system-s390x
+%%NONX86%%bin/qemu-system-sh4
+%%NONX86%%bin/qemu-system-sh4eb
+%%NONX86%%bin/qemu-system-sparc
+%%NONX86%%bin/qemu-system-sparc64
+%%BSD_USER%%bin/qemu-i386
+%%BSD_USER%%bin/qemu-sparc
+%%BSD_USER%%bin/qemu-sparc64
+%%BSD_USER%%bin/qemu-x86_64
bin/qemu-system-x86_64
-bin/qemu-system-xtensa
-bin/qemu-system-xtensaeb
+%%NONX86%%bin/qemu-system-xtensa
+%%NONX86%%bin/qemu-system-xtensaeb
@unexec if cmp -s %D/etc/qemu-ifup.sample %D/etc/qemu-ifup; then rm -f %D/etc/qemu-ifup; fi
etc/qemu-ifup.sample
@exec if [ ! -f %D/etc/qemu-ifup ] ; then cp -p %D/%F %B/qemu-ifup; fi