Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Dec 2004 01:17:30 -0800
From:      "David O'Brien" <obrien@freebsd.org>
To:        a.degroot@science.ru.nl
Cc:        freebsd-amd64@freebsd.org
Subject:   Re: Cross-compiling on x86 to amd64
Message-ID:  <20041201091730.GE1621@dragon.nuxi.com>
In-Reply-To: <Pine.GSO.4.44.0411231217470.18771-100000@odin.cs.kun.nl>
References:  <Pine.GSO.4.44.0411231217470.18771-100000@odin.cs.kun.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Nov 23, 2004 at 12:45:05PM +0100, a.degroot@science.ru.nl wrote:
> For various large compiles (KDE, mostly), I'm looking into setting up a
> compile farm to produce amd64 inaries. A basic distcc setup, to start with
> (icecream, the teambuilder-alike with some pretty neat features, is still
> horribly linux-specific and I need to fix that some time), but I'm
> somewhat lacking on the number-of-amd64 machines front, as in I've got 1.
> 
> So I got to thinking: why should the x86 machines in the house get a
> break? They should be able to produce amd64 code at the least.
> 
> The system gcc on 5.3-R on x86 doesn't like -m64:
> 
> -bash-2.05b$ g++ -c -m64 t.cc
> t.cc:1: sorry, unimplemented: 64-bit mode not compiled in
> 
> which is unfortunate, because if I understand correctly, that's the only
> flag I would really need to use to make gcc on x86en produce code for
> amd64 (ie.
> 
> 	x86box$ g++ -m64 t.cc
> 	amd64box$ g++ t.cc

Nope, you need a lot more than 'gcc -m64' to be accepted.  You also need
a 64-bit capable 'as' and 'ld'.  You also need 64-bit libs (matching
what's in /lib and /usr/lib), and 64-bit /usr/include/machine headers.

We're no where near ready to support cross building for 64-bits on a
32-bit machine and vice-versa.  I've got a WIP patch set for GCC on
FreeBSD/amd64 to enable one to build 32-bit binaries, provided 32-bit
libs are available.  But it will be a little while longer until things
are ready for use.

-- 
-- David  (obrien@FreeBSD.org)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041201091730.GE1621>