[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 10/11] rump kernels: Handle rumpxen host in configure



Support
   ./configure --host=x86_64-rumpxen-netbsd
   ./configure --host=i386-rumpxen-netbsd

Setting --host tells configure we are cross compiling and therefore
has various automatic effects.

But in this patch we make some deliberate changes as well:
 * We disable a large number of configure tests for libraries
   etc. which don't exist.
 * We set CONFIG_RUMP in Tools.mk.
 * Hence, we automatically set XEN_OS.

(I have only tested the 32-bit build but I think the 64-bit build
should work just as well.)

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
CC: Ian Campbell <Ian.Campbell@xxxxxxxxxx>

---
v2: Mention x86_64.
    Drop an erroneous whitespace change.
---
 config/Tools.mk.in |    5 +++++
 tools/configure    |   11 +++++++++++
 tools/configure.ac |   14 ++++++++++++--
 3 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/config/Tools.mk.in b/config/Tools.mk.in
index 852c941..748cc69 100644
--- a/config/Tools.mk.in
+++ b/config/Tools.mk.in
@@ -1,3 +1,8 @@
+CONFIG_RUMP         := @CONFIG_RUMP@
+ifeq ($(CONFIG_RUMP),y)
+XEN_OS              := NetBSDRump
+endif
+
 # Prefix and install folder
 prefix              := @prefix@
 PREFIX              := $(prefix)
diff --git a/tools/configure b/tools/configure
index 20f1aa9..a1bddb7 100755
--- a/tools/configure
+++ b/tools/configure
@@ -706,6 +706,7 @@ CPPFLAGS
 LDFLAGS
 CFLAGS
 CC
+CONFIG_RUMP
 host_os
 host_vendor
 host_cpu
@@ -2323,6 +2324,12 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 
's/ /-/g'`;; esac
 
 
 
+case $host_vendor in
+rumpxen) CONFIG_RUMP=y; rump=true ;;
+*)       CONFIG_RUMP=n; rump=false ;;
+esac
+
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -6704,6 +6711,8 @@ LDLFAGS=$ac_previous_ldflags
 
 fi
 
+if ! $rump; then
+
 # Extract the first word of "xgettext", so it can be a program name with args.
 set dummy xgettext; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -8160,6 +8169,8 @@ fi
 done
 
 
+fi
+
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
diff --git a/tools/configure.ac b/tools/configure.ac
index 6d70f04..44ba32f 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -20,6 +20,12 @@ APPEND_INCLUDES and APPEND_LIB instead when possible.])
 
 AC_CANONICAL_HOST
 
+case $host_vendor in
+rumpxen) CONFIG_RUMP=y; rump=true ;;
+*)       CONFIG_RUMP=n; rump=false ;;
+esac
+AC_SUBST(CONFIG_RUMP)
+
 AC_SYS_LARGEFILE
 
 case $ac_cv_sys_file_offset_bits in #(
@@ -34,11 +40,11 @@ AC_SUBST(FILE_OFFSET_BITS)
 m4_include([../m4/savevar.m4])
 m4_include([../m4/features.m4])
 m4_include([../m4/path_or_fail.m4])
+m4_include([../m4/checkpolicy.m4])
+m4_include([../m4/set_cflags_ldflags.m4])
 m4_include([../m4/python_version.m4])
 m4_include([../m4/python_devel.m4])
 m4_include([../m4/ocaml.m4])
-m4_include([../m4/checkpolicy.m4])
-m4_include([../m4/set_cflags_ldflags.m4])
 m4_include([../m4/uuid.m4])
 m4_include([../m4/pkg.m4])
 m4_include([../m4/curses.m4])
@@ -233,6 +239,8 @@ AS_IF([test "$cross_compiling" != yes], [
     AX_CHECK_PYTHON_DEVEL()
 ])
 
+if ! $rump; then
+
 AX_PATH_PROG_OR_FAIL([XGETTEXT], [xgettext])
 dnl as86, ld86, bcc and iasl are only required when the host system is x86*.
 dnl "host" here means the platform on which the hypervisor and tools is
@@ -287,5 +295,7 @@ esac
 # Checks for header files.
 AC_CHECK_HEADERS([yajl/yajl_version.h sys/eventfd.h valgrind/memcheck.h 
utmp.h])
 
+fi
+
 AC_OUTPUT()
 
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.