From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KRPKi-0003x1-Nd for mharc-grub-devel@gnu.org; Fri, 08 Aug 2008 06:36:32 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KRPKg-0003vh-I9 for grub-devel@gnu.org; Fri, 08 Aug 2008 06:36:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KRPKe-0003uZ-Kp for grub-devel@gnu.org; Fri, 08 Aug 2008 06:36:29 -0400 Received: from [199.232.76.173] (port=58497 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KRPKd-0003uD-Pb for grub-devel@gnu.org; Fri, 08 Aug 2008 06:36:27 -0400 Received: from mailout04.t-online.de ([194.25.134.18]:50031) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KRPKe-0001gj-7u for grub-devel@gnu.org; Fri, 08 Aug 2008 06:36:28 -0400 Received: from fwd27.aul.t-online.de by mailout04.sul.t-online.de with smtp id 1KRPKb-0003hf-04; Fri, 08 Aug 2008 12:36:25 +0200 Received: from [10.3.2.2] (Zk-+p8ZUwhxU-QAZlFEAosQaQQpQ2uFXF6aKWmJNY0Z1ylM53Xw1Lp7tXcNyrGKg-v@[217.235.232.131]) by fwd27.aul.t-online.de with esmtp id 1KRPKM-1eFiYi0; Fri, 8 Aug 2008 12:36:10 +0200 Message-ID: <489C219A.3000900@t-online.de> Date: Fri, 08 Aug 2008 12:36:10 +0200 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 SeaMonkey/1.1.11 MIME-Version: 1.0 To: The development of GRUB 2 References: In-Reply-To: Content-Type: multipart/mixed; boundary="------------080203030600070407020808" X-ID: Zk-+p8ZUwhxU-QAZlFEAosQaQQpQ2uFXF6aKWmJNY0Z1ylM53Xw1Lp7tXcNyrGKg-v X-TOI-MSGID: d3111c60-5164-4244-bccb-de6b1c2ba5db X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: bug: cygwin support breaks cross compiles on cygwin 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: Fri, 08 Aug 2008 10:36:30 -0000 This is a multi-part message in MIME format. --------------080203030600070407020808 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Patrick Georgi wrote: > Hi, > > I used cygwin to build grub2/i386-coreboot using an i386-elf cross > compiler. unfortunately the test in configure only looks for the host > platform and enables pe2elf in that case, even though my compiler > emits ELF already. > > my workaround is to just change that test (there's no OS cyg_win), but > of course that's no permanent solution. > Bean proposed on IRC to look if the target compiler emits PE, and > enable pe2elf based on that. > > Thanks for the info. A simple fix is probably a test for target_os also, please try attached patch (and re-run autoconf). Christian --------------080203030600070407020808 Content-Type: text/x-diff; name="grub2-configure.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="grub2-configure.patch" diff --git a/configure.ac b/configure.ac index 7a5938a..41e08f1 100644 --- a/configure.ac +++ b/configure.ac @@ -206,9 +206,10 @@ AC_MSG_RESULT([$TARGET_IMG_LDFLAGS_AC]) # For platforms where ELF is not the default link format. AC_MSG_CHECKING([for command to convert module to ELF format]) -if test "$host_os" = cygwin; then - TARGET_OBJ2ELF='grub-pe2elf.exe' -fi +case "${host_os}:${target_os}" in + cygwin:cygwin) TARGET_OBJ2ELF='grub-pe2elf.exe' ;; + *) ;; +esac AC_SUBST(TARGET_OBJ2ELF) AC_MSG_RESULT([$TARGET_OBJ2ELF]) --------------080203030600070407020808--