2008-07-17 Pavel Roskin <proski@gnu.org>
+ * configure.ac: Use -m32 or -m64 regardless of whether we had to
+ change target_cpu. The compiler default can mismatch target_cpu
+ in any case.
+
* disk/efi/efidisk.c: Fix format warnings on x86_64.
* kern/efi/efi.c: Likewise.
if test -z "$target_alias"; then
case "$target_cpu"-"$platform" in
x86_64-efi) ;;
- x86_64-*) target_cpu=i386 target_m32=1 ;;
- powerpc64-ieee1275) target_cpu=powerpc target_m32=1 ;;
+ x86_64-*) target_cpu=i386 ;;
+ powerpc64-ieee1275) target_cpu=powerpc ;;
esac
fi
# Check if the platform is supported, make final adjustments.
case "$target_cpu"-"$platform" in
i386-efi) ;;
- x86_64-efi) target_m64=1 ;;
+ x86_64-efi) ;;
i386-pc) ;;
i386-coreboot) ;;
i386-linuxbios) platform=coreboot ;;
{ (exit 1); exit 1; }; } ;;
esac
+case "$target_cpu" in
+ i386 | powerpc) target_m32=1 ;;
+ x86_64 | sparc64) target_m64=1 ;;
+esac
+
if test -z "$target_alias"; then
case "$target_cpu"-"$platform" in
x86_64-efi) ;;
- x86_64-*) target_cpu=i386 target_m32=1 ;;
- powerpc64-ieee1275) target_cpu=powerpc target_m32=1 ;;
+ x86_64-*) target_cpu=i386 ;;
+ powerpc64-ieee1275) target_cpu=powerpc ;;
esac
fi
# Check if the platform is supported, make final adjustments.
case "$target_cpu"-"$platform" in
i386-efi) ;;
- x86_64-efi) target_m64=1 ;;
+ x86_64-efi) ;;
i386-pc) ;;
i386-coreboot) ;;
i386-linuxbios) platform=coreboot ;;
*) AC_MSG_ERROR([platform "$platform" is not supported for target CPU "$target_cpu"]) ;;
esac
+case "$target_cpu" in
+ i386 | powerpc) target_m32=1 ;;
+ x86_64 | sparc64) target_m64=1 ;;
+esac
+
AC_SUBST(target_cpu)
AC_SUBST(platform)