Subject: Re: building 32bit binaries
To: None <tech-toolchain@NetBSD.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-toolchain
Date: 11/25/2007 00:18:19
On Fri, Oct 19, 2007 at 04:53:31PM +0200, Christoph Egger wrote:
>
> Hi!
>
> I'm about making xen-tools buildable on NetBSD/amd64.
>
> The build currently stops at building the Xen firmware that is used
> to run HVM guests.
> [...]
> gmake[3]: Leaving directory `xen-unstable.hg/xen/arch/x86'
> gmake -f xen-unstable.hg/xen/Rules.mk include/asm-x86/asm-offsets.h
> ld -melf_i386 -r tcgbios.o tpm_drivers.o -o tcgbiosext.o
> ld: cannot open linker script file ldscripts/elf_i386.xr: No such file or
> directory
> gmake[4]: *** [tcgbiosext.o] Error 1
> gmake[4]: Leaving directory
> `xen-unstable.hg/tools/firmware/rombios/32bit/tcgbios'
> gmake[3]: *** [subdirs] Error 2
> gmake[3]: Leaving directory `xen-unstable.hg/tools/firmware/rombios/32bit'
> gmake[2]: *** [all] Error 2
> gmake[2]: Leaving directory `xen-unstable.hg/tools/firmware'
> gmake[1]: *** [install] Error 2
> gmake[1]: Leaving directory `xen-unstable.hg/tools'
> gmake: *** [install-tools] Error 2
>
>
> I could work around this by copying elf_i386.xr from a NetBSD/i386
> installation into /usr/share/ldscripts/.
>
> Can someone add elf_i386.xr to the standard distribution of NetBSD/amd64,
> please?
> This should allow building 32bit binaries on NetBSD/amd64 out of the box.
Hi,
I think it's desireable to have the i386 scripts on amd64 because it also
allows to build the x86 bootblock using the native toolchain. No need to
run into build.sh tools just to rebuild the boot loader with different
options ...
The attached patch does install the ldscripts on amd64. Any objection ?
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--