From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60368) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQu1u-0006a9-Fl for qemu-devel@nongnu.org; Wed, 03 Feb 2016 04:47:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQu1p-00030A-Dn for qemu-devel@nongnu.org; Wed, 03 Feb 2016 04:47:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38292) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQu1p-000306-7x for qemu-devel@nongnu.org; Wed, 03 Feb 2016 04:47:13 -0500 Date: Wed, 3 Feb 2016 09:47:10 +0000 From: Stefan Hajnoczi Message-ID: <20160203094710.GC26227@stefanha-x1.localdomain> References: <1454065944-15887-1-git-send-email-markmb@redhat.com> <1454411187.9300.54.camel@redhat.com> <20160202135814.68dc0dae@crunchbang> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9Ek0hoCL9XbhcSqy" Content-Disposition: inline In-Reply-To: <20160202135814.68dc0dae@crunchbang> Subject: Re: [Qemu-devel] [PATCH v4] Add optionrom compatible with fw_cfg DMA version List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marc =?iso-8859-1?Q?Mar=ED?= Cc: "Gabriel L. Somlo" , qemu-devel@nongnu.org, Kevin O'Connor , Gerd Hoffmann , Paolo Bonzini , Marc =?iso-8859-1?Q?Mar=ED?= , Laszlo --9Ek0hoCL9XbhcSqy Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 02, 2016 at 01:58:14PM +0100, Marc Mar=ED wrote: > El Tue, 02 Feb 2016 12:06:27 +0100 > Gerd Hoffmann escribi=F3: > > Hi, > >=20 > > > %.img: %.o > > > - $(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -Ttext 0 -e > > > _start -s -o $@ $<," Building $(TARGET_DIR)$@") > > > + $(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -m elf_i386 > > > -Ttext 0 -e _start -s -o $@ $<," Building $(TARGET_DIR)$@") > >=20 > > Hmm, that breaks the windows cross build: > >=20 > > make: Entering directory `/home/kraxel/projects/qemu/build-win32' > > Building optionrom/linuxboot_dma.img > > i686-w64-mingw32-ld: unrecognised emulation mode: elf_i386 > > Supported emulations: i386pe > > make[1]: *** [linuxboot_dma.img] Error 1 >=20 > Thanks for reporting. >=20 > I don't know much about Windows cross-builds. Any idea on how to solve > the issue? The Windows toolchain doesn't use ELF binaries so -m elf_i386 doesn't work there (the emulation is called "i386pe" in i686-w64-mingw32-ld). I wonder whether it's possible to use gcc -m32 ... -o $@ %< as a wrapper that automatically does the right thing. But I guess it won't work since gcc wants a C source file and not an object file as input. You could make the emulation ("elf_i386" vs "i386pe") conditional on the host platform (CONFIG_WIN32=3Dy). I'm not sure what the most elegant solution is. Stefan --9Ek0hoCL9XbhcSqy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWscyeAAoJEJykq7OBq3PINTEH/iqJcLX8M5X2wvoHRYV2ctrs 7/ROtJy7CW/xg0urnYf4DF7PxC5Wf/8bHEWWSTjLznBUrt3Z8FNf5TwSw7JevusC +Uh50OpT3AaTPTosSo0LU6DkqQcu+0IbstZ3g3KIxEKbGtSSvN++56rL0hZOvScp Mx9muUMT0bPTCe15mBax0QCWHYt4HA5v28fOcNk60avThSUaqwkkwLxmfeeQLqb3 suunMWwjadKOBjHGlw/S/f6pAIuslKnFIPj4ErF0G7MIMtXWnWue6SdjZPPUfNHG fAkdH4J57hr5wfpWfWYQqc3EWsJkkmgsX+a7lCDT/I/HEz0QdBhS8D8uNwKXDUU= =YsLZ -----END PGP SIGNATURE----- --9Ek0hoCL9XbhcSqy--