From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KR4ZP-0002Pn-5p for mharc-grub-devel@gnu.org; Thu, 07 Aug 2008 08:26:19 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KR4ZN-0002MY-5F for grub-devel@gnu.org; Thu, 07 Aug 2008 08:26:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KR4ZM-0002LQ-FX for grub-devel@gnu.org; Thu, 07 Aug 2008 08:26:16 -0400 Received: from [199.232.76.173] (port=44303 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KR4ZM-0002LB-Bu for grub-devel@gnu.org; Thu, 07 Aug 2008 08:26:16 -0400 Received: from aybabtu.com ([69.60.117.155]:41384) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KR4ZM-0002NP-20 for grub-devel@gnu.org; Thu, 07 Aug 2008 08:26:16 -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 1KR4Rr-0003o5-VE for grub-devel@gnu.org; Thu, 07 Aug 2008 14:18:32 +0200 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1KR4YH-0002hk-Oo for grub-devel@gnu.org; Thu, 07 Aug 2008 14:25:09 +0200 Date: Thu, 7 Aug 2008 14:25:09 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20080807122509.GA10327@thorin> References: <1217809888.6283.27.camel@fz.local> <20080804091619.GA737@thorin> <1217854285.27237.6.camel@dv> <20080807122103.GA10038@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080807122103.GA10038@thorin> 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: merging i386-efi and x86_64-efi (Re: Current SVN is broken on x86_64) 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: Thu, 07 Aug 2008 12:26:17 -0000 On Thu, Aug 07, 2008 at 02:21:03PM +0200, Robert Millan wrote: > On Mon, Aug 04, 2008 at 08:51:25AM -0400, Pavel Roskin wrote: > > On Mon, 2008-08-04 at 11:16 +0200, Robert Millan wrote: > > > > > Furthermore, I had a look and some of the x86_64 versions are just stubs that > > > include the i386 one. > > > > > > Why don't we handle this like Linux? They ship a single directory and use > > > #ifdefs where appropiate. That enforces consistency in the dir layout. > > > > I think we can do it. i386 and x86_64 could be joined into one "x86" > > architecture with common headers and sources. Perhaps the users should > > still use i386 and x86_64 in configure, but the code should be mostly > > common. > > I gave a try at this, which I haven't completed yet. Here's what I have > so far. > > The biggest stumbling block seems to be that autoconf doesn't make it easy > to do AC_CHECK_SIZEOF checks for standard compiling and cross-compiling in > the same run (it does support cross-compiling though). > > I haven't found a way to do it. If I modify types.m4 to export its > findings to a variable instead of dumping them to config.h directly, > further calls to the same check won't return different results, even if > CC / CFLAGS has been adjusted. Somebody pointed an interesting solution to me on IRC: we could have multiple configure scripts, one for each kind of compilation. I think what would fit well in this scheme is a simple util/configure that just setups things to build native tools "the usual way", and then the main configure can: a) Invoke util/configure with the right params for native compilation b) Simplify its own arch handling logic. Thoughts? -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."