5 : ${BUILD_HOST_ARCH:=`uname -m`}
7 if [ -z "$BUILD_ARCH" ]; then
8 BUILD_ARCH="$BUILD_HOST_ARCH"
9 test i686 != "$BUILD_ARCH" || BUILD_ARCH=i586 # XXX: why?
13 i686) BUILD_ARCH="i686:i586:i486:i386" ;;
14 i586) BUILD_ARCH="i586:i486:i386" ;;
15 i486) BUILD_ARCH="i486:i386" ;;
16 i386) BUILD_ARCH="i386" ;;
17 x86_64) BUILD_ARCH="x86_64:i686:i586:i486:i386" ;;
18 sparc64v) BUILD_ARCH="sparc64v:sparc64:sparcv9v:sparcv9:sparcv8:sparc" ;;
19 sparc64) BUILD_ARCH="sparc64:sparcv9:sparcv8:sparc" ;;
20 sparcv9v) BUILD_ARCH="sparcv9v:sparcv9:sparcv8:sparc" ;;
21 sparcv9) BUILD_ARCH="sparcv9:sparcv8:sparc" ;;
22 sparcv8) BUILD_ARCH="sparcv8:sparc" ;;
23 sparc) BUILD_ARCH="sparc" ;;
25 if test "$BUILD_ARCH" != "${BUILD_ARCH#i686}" ; then
26 cpuflags=`grep ^flags /proc/cpuinfo`
28 if test "$cpuflags" = "${cpuflags/ cx8 /}" -o "$cpuflags" = "${cpuflags/ cmov /}"; then
29 echo "Your cpu doesn't support i686 rpms. Exit."
37 if test -e $BUILD_ROOT/exit; then
46 for arch in $EMULATOR_ARCHS; do
47 if test "$BUILD_ARCH" = "$arch" -a "$BUILD_HOST_ARCH" != "$arch"; then
56 is_emulator_arch || return
58 if [ -z "$VM_TYPE" ]; then
62 # to run the qemu initialization in the XEN chroot, we need to register it with a statically build shell
63 case "$BUILD_HOST_ARCH" in
65 if test -e /bin/bash-static \
66 -a -e /bin/mount-static \
67 -a -e /usr/sbin/qemu-binfmt-conf.sh; then
71 echo "Warning: cross compile not possible due to missing static binaries"