summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2011-06-27 16:57:47 -0700
committerRobert Mustacchi <rm@joyent.com>2011-06-27 16:57:47 -0700
commit4e523287a04836b483d1d858ae94078c95ae1038 (patch)
tree0c565b5d862653938476c1ec505d602eb04df923
parenta6e5c17ff4843b94d52bfb5138af99f7f586db7a (diff)
downloadillumos-kvm-cmd-4e523287a04836b483d1d858ae94078c95ae1038.tar.gz
HVM-429 vnic support should be a proper qemu configuration option
-rw-r--r--Makefile.objs7
-rwxr-xr-xbuild.sh5
-rwxr-xr-xconfigure35
3 files changed, 38 insertions, 9 deletions
diff --git a/Makefile.objs b/Makefile.objs
index 3e841e4..7b85e9e 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -47,13 +47,6 @@ net-nested-$(CONFIG_VDE) += vde.o
net-nested-$(CONFIG_SUNOS_VNIC) += vnic.o
net-obj-y += $(addprefix net/, $(net-nested-y))
-#
-# We need to link against libdlpi if we have CONFIG_SUNOS_VNIC
-#
-ifeq ($(CONFIG_SUNOS_VNIC),y)
-LDFLAGS+=-ldlpi
-endif
-
ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS),yy)
# Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add.
# only pull in the actual virtio-9p device if we also enabled virtio.
diff --git a/build.sh b/build.sh
index e322312..c508f3a 100755
--- a/build.sh
+++ b/build.sh
@@ -27,5 +27,10 @@ echo "==> Running configure"
--kerneldir=$(cd `pwd`/../kvm; pwd) \
--cpu=x86_64
+if [[ $? != 0 ]]; then
+ echo "Failed to configure, bailing"
+ exit 1
+fi
+
echo "==> Make"
gmake -j10
diff --git a/configure b/configure
index 100af30..52001c8 100755
--- a/configure
+++ b/configure
@@ -139,6 +139,7 @@ xen=""
linux_aio=""
attr=""
vhost_net=""
+sunos_vnic=""
xfs=""
gprof="no"
@@ -749,6 +750,10 @@ for opt do
;;
--enable-rbd) rbd="yes"
;;
+ --disable-sunos-vnic) sunos_vnic="no"
+ ;;
+ --enable-sunos-vnic) sunos_vnic="yes"
+ ;;
*) echo "ERROR: unknown option $opt"; show_help="yes"
;;
esac
@@ -942,6 +947,8 @@ echo " --enable-docs enable documentation build"
echo " --disable-docs disable documentation build"
echo " --disable-vhost-net disable vhost-net acceleration support"
echo " --enable-vhost-net enable vhost-net acceleration support"
+echo " --disable-sunos-vnic disable support for crossbow vnics"
+echo " --enable-sunos-vnic enable support for crossbow vnics"
echo " --enable-trace-backend=B Set trace backend"
echo " Available backends:" $("$source_path"/scripts/tracetool --list-backends)
echo " --with-trace-file=NAME Full PATH,NAME of file to store traces"
@@ -1900,6 +1907,24 @@ EOF
fi
fi
+
+##########################################
+# test for sunos vnic
+
+if test "$sunos_vnic" != "no"; then
+ cat > $TMPC <<EOF
+#include <libdlpi.h>
+int main(void) { return 0; }
+EOF
+ if compile_prog "" "-ldlpi" ; then
+ sunos_vnic=yes
+ else
+ if test "sunos_vnic" = "yes" ; then
+ feature_not_found "sunos-vnic"
+ fi
+ fi
+fi
+
##########################################
# pthread probe
PTHREADLIBS_LIST="-lpthread -lpthreadGC2"
@@ -2612,6 +2637,7 @@ echo "madvise $madvise"
echo "posix_madvise $posix_madvise"
echo "uuid support $uuid"
echo "vhost-net support $vhost_net"
+echo "SunOS VNIC support $sunos_vnic"
echo "Trace backend $trace_backend"
echo "Trace output file $trace_file-<pid>"
echo "spice support $spice"
@@ -2694,8 +2720,6 @@ fi
if test "$solaris" = "yes" ; then
echo "CONFIG_SOLARIS=y" >> $config_host_mak
echo "CONFIG_SOLARIS_VERSION=$solarisrev" >> $config_host_mak
-# XXX rm needs to test / make this be a part of configure
- echo "CONFIG_SUNOS_VNIC=y" >> $config_host_mak
if test "$needs_libsunmath" = "yes" ; then
echo "CONFIG_NEEDS_LIBSUNMATH=y" >> $config_host_mak
fi
@@ -2896,6 +2920,13 @@ if test "$spice" = "yes" ; then
echo "CONFIG_SPICE=y" >> $config_host_mak
fi
+if test "$sunos_vnic" = "yes" ; then
+ echo "CONFIG_SUNOS_VNIC=y" >> $config_host_mak
+ LDFLAGS="-ldlpi $LDFLAGS"
+else
+ echo "failed"
+fi
+
# XXX: suppress that
if [ "$bsd" = "yes" ] ; then
echo "CONFIG_BSD=y" >> $config_host_mak