From 3f4ce737bbdc3c8e82c193de2bf35bc7c3a9ac52 Mon Sep 17 00:00:00 2001 From: proski Date: Fri, 18 Jul 2008 03:21:47 +0000 Subject: [PATCH] 2008-07-17 Pavel Roskin * 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. --- ChangeLog | 4 ++++ configure | 11 ++++++++--- configure.ac | 11 ++++++++--- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 11eac21b4..ceb29f0d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-07-17 Pavel Roskin + * 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. diff --git a/configure b/configure index ede2168d2..046c23e13 100644 --- a/configure +++ b/configure @@ -1962,15 +1962,15 @@ fi 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 ;; @@ -1982,6 +1982,11 @@ echo "$as_me: error: platform \"$platform\" is not supported for target CPU \"$t { (exit 1); exit 1; }; } ;; esac +case "$target_cpu" in + i386 | powerpc) target_m32=1 ;; + x86_64 | sparc64) target_m64=1 ;; +esac + diff --git a/configure.ac b/configure.ac index 4d47f64cd..1d8bd08f0 100644 --- a/configure.ac +++ b/configure.ac @@ -76,15 +76,15 @@ fi 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 ;; @@ -94,6 +94,11 @@ case "$target_cpu"-"$platform" in *) 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)