Date: Sun, 7 Mar 2004 18:58:53 +0100 From: Francois Tigeot <ftigeot@wolfpond.org> To: freebsd-amd64@freebsd.org Cc: freebsd-current@freebsd.org Subject: Re: Cross-compilation to i386 Message-ID: <20040307175852.GD40161@ares.wolfpond.org> In-Reply-To: <20040304175103.GA36195@ares.wolfpond.org> References: <20040304175103.GA36195@ares.wolfpond.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[copy to -current since it may be of help to other freebsd ports]
On Thu, Mar 04, 2004 at 06:51:03PM +0100, Francois Tigeot wrote:
>
> I'm currently running a 5.2.1-RELEASE/amd64 system and I'm trying to
> cross-build an i386 world with the following command :
>
> time nice make buildworld TARGET_ARCH=i386 DESTDIR=/itx
>
> This fails miserably with these error messages :
>
> cc -Os -march=c3 -fno-strict-aliasing -pipe -I/usr/src/sbin/gbde/../../sys -DRESCUE -Wsystem -headers -Werror -Wall -Wno-format-y2k -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer -arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -c /usr/src/sys/crypto/sha2/sha2.c
> {standard input}: Assembler messages:
> {standard input}:92: Error: bignum invalid
> {standard input}:93: Error: bignum invalid
> [more bignum invalid lines]
I've managed to make it work.
The 'bignum invalid' error is caused by this type of gcc-generated
assembly code :
.quad 8158064640168781261
.quad -5349999486874862801
For some reason, as doesn't like big negative numbers.
This is what I did :
- I installed a stock copy of binutils compiled with
--target=i386-freebsd and --enable-64-bit-bfd
- I initiated a buildworld to populate /usr/obj
- After the first build failure, I replaced /usr/obj/i386/usr/src/amd64/usr/bin/as
with the new assembler, protecting it by a chflags command
The world and kernel builds then completed succesfully. The new i386 kernel
boots on a diskless machine.
Now, I understand a new binutils import was scheduled before 5.3-RELEASE.
Is there any reason not to compile it with the '--enable-64-bit-bfd'
option on 64-bit architectures ?
--
Francois Tigeot
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040307175852.GD40161>
