Skip to contentSkip to conversation

ioemu - Use XEN_TARGET_ARCH

PATCH In review Bastian Blank 2 participants 2 messages Jan 22, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ioemu - Use XEN_TARGET_ARCH

# HG changeset patch
# User Bastian Blank <[email protected]>
# Date 1200753844 -3600
# Node ID a348c9b413689c85e3d29109589b2d9257997706 # Parent 42fca43eee53d9e594f36f14919082ad3fcdeadb Use XEN_TARGET_ARCH instead of uname -m.

tools/Makefile +1 -1
diff -r 42fca43eee53 -r a348c9b41368 tools/Makefile
@@ -68,7 +68,7 @@ export IOEMU_DIR ?= ioemu
 export IOEMU_DIR ?= ioemu
 ioemu ioemuinstall:
 	[ -f $(IOEMU_DIR)/config-host.mak ] || \
-	  (cd $(IOEMU_DIR) && sh configure --prefix=/usr)
+	  (cd $(IOEMU_DIR) && XEN_TARGET_ARCH=$(XEN_TARGET_ARCH) sh configure --prefix=/usr)
 	$(MAKE) -C $(IOEMU_DIR) $(patsubst ioemu%,%,$@)
 ioemuclean:
 	$(MAKE) -C $(IOEMU_DIR) distclean
tools/ioemu/configure +4 -32
diff -r 42fca43eee53 -r a348c9b41368 tools/ioemu/configure
@@ -29,43 +29,15 @@ make="make"
 make="make"
 install="install"
 strip="strip"
-cpu=`uname -m`
 target_list=""
-case "$cpu" in
-  i386|i486|i586|i686|i86pc|BePC)
+case "$XEN_TARGET_ARCH" in
+  x86_32)
     cpu="i386"
   ;;
-  armv*b)
-    cpu="armv4b"
-  ;;
-  armv*l)
-    cpu="armv4l"
-  ;;
-  alpha)
-    cpu="alpha"
-  ;;
-  "Power Macintosh"|ppc|ppc64)
+  powerpc)
     cpu="powerpc"
   ;;
-  mips)
-    cpu="mips"
-  ;;
-  s390)
-    cpu="s390"
-  ;;
-  sparc|sun4[muv])
-    cpu="sparc"
-  ;;
-  sparc64)
-    cpu="sparc64"
-  ;;
-  ia64)
-    cpu="ia64"
-  ;;
-  m68k)
-    cpu="m68k"
-  ;;
-  x86_64|amd64)
+  x86_64)
     cpu="x86_64"
     libdir="lib64"
   ;;

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 1 line · Bastian Blank

Use XEN_TARGET_ARCH instead of uname -m.

Yes, good. I had the following problem doing what in Linux would be a
cross-build: the 64-bit ioemu thought that HOST_LONG_BITS was 4 - this totally broke HVM live migration for fairly obvious reasons.

Looks like your patch would help us, though I haven't tested it. I have been using the variant below.

regards
john

tools/Makefile +1 -1
@@ -73,7 +73,7 @@ ioemu ioemuinstall:
 ioemu ioemuinstall:
        if [ -f $(IOEMU_DIR)/config-host.mak ] || \
          (cd $(IOEMU_DIR) && sh configure --target-list=$(IOEMU_TARGET) \
-             --prefix=/usr --install=$(INSTALL)); then \
+             --cpu=$(XEN_TARGET_ARCH) --prefix=/usr --install=$(INSTALL)); then \
                $(MAKE) -C $(IOEMU_DIR) $(patsubst ioemu%,%,$@); \
        fi;
 ioemuclean:
tools/ioemu/configure +4 -0
@@ -463,6 +463,10 @@ fi
 
 fi
 
+if test "$cpu" = "x86_32"; then
+       cpu="i386"
+fi
+
 # host long bits test
 hostlongbits="32"
 if test "$cpu" = "sparc64" -o "$cpu" = "ia64" -o "$cpu" = "x86_64" -o "$cpu" = "alpha"; then