Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 07c41fb

Browse files
committed
build lib/runvxenlight only if xen version is greater than 4.9
Signed-off-by: Wang Xu <[email protected]>
1 parent 3a8721b commit 07c41fb

File tree

6 files changed

+22
-4
lines changed

6 files changed

+22
-4
lines changed

Makefile.am

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ else
55
XEN_BUILD_TAG=
66
endif
77

8+
if WITH_XEN490
9+
XEN490_BUILD_TAG=with_xen490
10+
else
11+
XEN490_BUILD_TAG=
12+
endif
13+
814
if WITH_LIBVIRT
915
LIBVIRT_BUILD_TAG=with_libvirt
1016
else
@@ -13,7 +19,7 @@ endif
1319

1420
COMMIT=`git describe --dirty --always --tags 2> /dev/null || true`
1521
GOLDFLAGS="-X main.gitCommit=${COMMIT} -X main.version=${VERSION}"
16-
HYPER_BULD_TAGS=$(XEN_BUILD_TAG) $(LIBVIRT_BUILD_TAG)
22+
HYPER_BULD_TAGS=$(XEN_BUILD_TAG) $(XEN490_BUILD_TAG) $(LIBVIRT_BUILD_TAG)
1723

1824
all-local: build-runv
1925
clean-local:

configure.ac

+10
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,21 @@ if test "x$with_xen" != "xno" ; then
7070
fi
7171
fi
7272

73+
XENPV_REQUIRED="4.9.0"
74+
75+
if test "$with_xen" = yes; then
76+
PKG_CHECK_MODULES([xenlight], [xenlight >= $XENPV_REQUIRED], [with_xen490=yes], [with_xen490=no])
77+
fi
78+
7379
if test "x$with_xen" != "xno" ; then
7480
AC_DEFINE_UNQUOTED([WITH_XEN], 1, [run hyperd with xen])
7581
fi
82+
if test "x$with_xen490" = "xyes" ; then
83+
AC_DEFINE_UNQUOTED([WITH_XEN490], 1, [run runv with xen 4.9 or above])
84+
fi
7685

7786
AM_CONDITIONAL([WITH_XEN], [test "x$with_xen" == "xyes"])
87+
AM_CONDITIONAL([WITH_XEN490], [test "x$with_xen490" == "xyes"])
7888

7989
AC_CONFIG_FILES([Makefile])
8090

hypervisor/xenpv/xenpv.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build linux,with_xen
1+
// +build linux,with_xen490
22

33
package xenpv
44

hypervisor/xenpv/xenpv_unsupported.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build !with_xen
1+
// +build !with_xen490
22

33
package xenpv
44

lib/runvxenlight/xenlight-runv.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build linux,with_xen
1+
// +build linux,with_xen490
22

33
/*
44
*

lib/runvxenlight/xenlight.go

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// +build linux,with_xen490
2+
13
/*
24
* Copyright (C) 2016 George W. Dunlap, Citrix Systems UK Ltd
35
*

0 commit comments

Comments
 (0)