From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KKECd-0004U2-C4 for mharc-grub-devel@gnu.org; Sat, 19 Jul 2008 11:18:31 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KKECa-0004TC-Mz for grub-devel@gnu.org; Sat, 19 Jul 2008 11:18:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KKECY-0004Sj-TD for grub-devel@gnu.org; Sat, 19 Jul 2008 11:18:28 -0400 Received: from [199.232.76.173] (port=54311 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KKECY-0004Sf-O9 for grub-devel@gnu.org; Sat, 19 Jul 2008 11:18:26 -0400 Received: from aybabtu.com ([69.60.117.155]:58782) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KKECY-0000DN-74 for grub-devel@gnu.org; Sat, 19 Jul 2008 11:18:26 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1KKE6w-00041V-Qm for grub-devel@gnu.org; Sat, 19 Jul 2008 17:12:39 +0200 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1KKEBd-0006mf-LW for grub-devel@gnu.org; Sat, 19 Jul 2008 17:17:29 +0200 Date: Sat, 19 Jul 2008 17:17:29 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20080719151729.GF23778@thorin> References: <1216313442.16120.29.camel@dv> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1216313442.16120.29.camel@dv> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] Simplify target and platform checks X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jul 2008 15:18:29 -0000 Thanks, this was really needed. I hope it's less of a mess now. On Thu, Jul 17, 2008 at 12:50:42PM -0400, Pavel Roskin wrote: > ChangeLog: > > * configure.ac: Default to efi platform for x86_64-apple. Allow > powerpc64 CPU, default to ieee1275 platform for it. Split CPU > adjustments from the rest, only do them if target is not > explicitly given. Merge other adjustments with the final sanity > check. Remove an extraneous check for supported CPU. Be > specific which CPU and which platform is not supported. > > Index: configure.ac > =================================================================== > --- configure.ac (revision 1716) > +++ configure.ac (working copy) > @@ -61,46 +61,37 @@ > case "$target_cpu"-"$target_vendor" in > i386-apple) platform=efi ;; > i386-*) platform=pc ;; > + x86_64-apple) platform=efi ;; > x86_64-*) platform=pc ;; > powerpc-*) platform=ieee1275 ;; > + powerpc64-*) platform=ieee1275 ;; > sparc64-*) platform=ieee1275 ;; > - *) AC_MSG_ERROR([unsupported machine type]) ;; > + *) AC_MSG_ERROR([unsupported CPU: "$target_cpu"]) ;; > esac > else > platform="$with_platform" > fi > > -case "$platform" in > - linuxbios) platform=coreboot ;; > -esac > - > -if test "x$platform" = "xefi" ; then > - case "$target_cpu" in > - i386) ;; > - x86_64) target_m64=1 ;; > - *) AC_MSG_ERROR([unsupported CPU type for EFI]) ;; > +# Adjust CPU unless target was explicitly specified. > +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 ;; > esac > -else > - case "$target_cpu" in > - i386) ;; > - x86_64) target_cpu=i386 target_m32=1 ;; > - powerpc) ;; > - powerpc64) target_cpu=powerpc target_m32=1;; > - sparc64) ;; > - *) AC_MSG_ERROR([unsupported CPU type]) ;; > - esac > fi > > -# Sanity check. > +# Check if the platform is supported, make final adjustments. > case "$target_cpu"-"$platform" in > i386-efi) ;; > - x86_64-efi) ;; > + x86_64-efi) target_m64=1 ;; > i386-pc) ;; > i386-coreboot) ;; > + i386-linuxbios) platform=coreboot ;; > i386-ieee1275) ;; > powerpc-ieee1275) ;; > sparc64-ieee1275) ;; > - *) AC_MSG_ERROR([unsupported machine type]) ;; > + *) AC_MSG_ERROR([platform "$platform" is not supported for target CPU "$target_cpu"]) ;; > esac > > AC_SUBST(target_cpu) > > -- > Regards, > Pavel Roskin > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > -- Robert Millan I know my rights; I want my phone call! What good is a phone call… if you are unable to speak? (as seen on /.)