From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LSWdB-0001y0-Nt for mharc-grub-devel@gnu.org; Thu, 29 Jan 2009 08:08:29 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LSWdA-0001xg-6O for grub-devel@gnu.org; Thu, 29 Jan 2009 08:08:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LSWd8-0001xU-Df for grub-devel@gnu.org; Thu, 29 Jan 2009 08:08:27 -0500 Received: from [199.232.76.173] (port=42005 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LSWd8-0001xR-9j for grub-devel@gnu.org; Thu, 29 Jan 2009 08:08:26 -0500 Received: from aybabtu.com ([69.60.117.155]:58832) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LSWd4-000300-N1; Thu, 29 Jan 2009 08:08:22 -0500 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 1LSWYh-0005lE-FG; Thu, 29 Jan 2009 14:03:53 +0100 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1LSWcL-0004Gs-97; Thu, 29 Jan 2009 14:07:37 +0100 Date: Thu, 29 Jan 2009 14:07:37 +0100 From: Robert Millan To: Pavel Roskin Message-ID: <20090129130737.GD15436@thorin> References: <1233195275.2727.18.camel@dv> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1233195275.2727.18.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-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: grub-devel@gnu.org Subject: Re: Cross-compilation check broken 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, 29 Jan 2009 13:08:28 -0000 On Wed, Jan 28, 2009 at 09:14:34PM -0500, Pavel Roskin wrote: > Hello, Robert! > > Your commit 1955 breaks my script for testing PowerPC. That's the > script: > > #!/bin/sh > set -e > CROSS_PATH=/home/proski/src/buildroot/build_powerpc/staging_dir/usr/bin > PATH=$CROSS_PATH:$PATH > ./configure --with-platform=ieee1275 --target=powerpc-linux > make -j2 > ./grub-mkrescue --grub-mkimage=./grub-mkelfimage --pkglibdir=. grub.iso > qemu-system-ppc -nographic -cdrom grub.iso -boot d > > I compile for target "powerpc-linux" and I have powerpc-linux-gcc in the > PATH. However, I'm using native tools. I'm not interested in running > tools in an emulator (actually, I have another script that does it). > Therefore, build and host are the same, so TARGET_CC is set to gcc. > > The new check must be wrong. TARGET_CC is used to build executables for > the target system. It should be found using the specified target even > if the tools are compiled natively. > > Actually, the original check wasn't particularly good. Maybe we could > check if target_alias is defined? Or maybe we could always check for > TARGET_CC? Hi Pavel, This check looks really confusing. I naively assumed it was checking if we're cross-compiling like the comment said ;-) But if it really meant to compare target with host, I think it should be: if test "x$target_cpu" != "x$host_cpu"; then rather than what was before: if test "x$target" != "x$host"; then Since "$target_os" has no real meaning. Does that work for you? -- 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."