From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MYRBQ-00059O-2I for mharc-grub-devel@gnu.org; Tue, 04 Aug 2009 17:04:32 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MYRBL-0004zw-Q2 for grub-devel@gnu.org; Tue, 04 Aug 2009 17:04:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MYRBH-0004ox-4F for grub-devel@gnu.org; Tue, 04 Aug 2009 17:04:27 -0400 Received: from [199.232.76.173] (port=45778 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYRBH-0004ot-0y for grub-devel@gnu.org; Tue, 04 Aug 2009 17:04:23 -0400 Received: from mailout04.t-online.de ([194.25.134.18]:45210) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MYRBG-0005mH-An for grub-devel@gnu.org; Tue, 04 Aug 2009 17:04:22 -0400 Received: from fwd10.aul.t-online.de by mailout04.t-online.de with smtp id 1MYRBE-00055B-03; Tue, 04 Aug 2009 23:04:20 +0200 Received: from [10.3.2.2] (r3SmNEZTQh4smBIDmFk5zAUWNuwvAhzwqAkmvzLxWrxjXRep3R-O28t9q3hr5rDQF9@[217.235.244.161]) by fwd10.aul.t-online.de with esmtp id 1MYRB8-0WaqQ40; Tue, 4 Aug 2009 23:04:14 +0200 Message-ID: <4A78A257.6040603@t-online.de> Date: Tue, 04 Aug 2009 23:04:23 +0200 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090403 SeaMonkey/1.1.16 MIME-Version: 1.0 To: The development of GRUB 2 References: <20090731144632.GA14036@thorin> <4A7337AE.5020505@t-online.de> <20090801142523.GB22989@thorin> <4A745A06.4010604@t-online.de> <20090802213111.GB15139@thorin> <1MXtv1-0mkKXY0@fwd00.aul.t-online.de> <20090804202215.GB15811@thorin> In-Reply-To: <20090804202215.GB15811@thorin> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ID: r3SmNEZTQh4smBIDmFk5zAUWNuwvAhzwqAkmvzLxWrxjXRep3R-O28t9q3hr5rDQF9 X-TOI-MSGID: 12463c4f-1bcf-45ac-92fe-9db722503937 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: grub-pe2elf 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: Tue, 04 Aug 2009 21:04:28 -0000 Robert Millan wrote: > I don't understand what you mean about a "Linux cross-compiler": > > - Why a compiler? AFAICT, the problem here is assembly/linkage > rather than compiling. binutils should suffice. > > Unfortunately this is not true: Some assembly language directives generated by gcc differ between PE and ELF. An ELF 'gas' does not accept assembly output from a PE 'gcc' and vice versa. The whole toolchain must support ELF. > - It's not really "Linux", just generic ELF support (i.e. > i386-pc-elf rather than i386-pc-linux-gnu). > > OK :-) > - It's not exactly "cross". I think something like > --enable-targets=i386-pc-elf when building binutils should > work just fine. This produces an "ld" that understands multiple > formats (-m switch). Have you tried this? > > Cygwin binutils are build with this option: $ ld --help ... ld: supported targets: pe-i386 pei-i386 elf32-i386 elf32-little elf32-big srec symbolsrec tekhex binary ihex But this does not help because ld refuses to build ELF output from PE input. So you need an ELF gas. Which requires an ELF gcc... I already described that here: http://lists.gnu.org/archive/html/grub-devel/2007-11/msg00233.html -- Regards, Christian Franke