Cross-compiling on x86 to amd64
Conrad J. Sabatier
conrads at cox.net
Wed Nov 24 04:22:22 PST 2004
On Tue, 23 Nov 2004 12:45:05 +0100 (MET), a.degroot at 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
> should produce identical results?). Information on building a
> cross-compiling gcc is not thick on the ground (at least, not for a
> trivial setup like this -- for weird embedded targets there seems to
> be enough). Does anyone have a hint on how to set this up -- or just
> plain build a gcc 3.4.3 that outputs amd64 .o files -- so my x86en can
> compile for their new 64 bit overlords?
> PS. Yes, I realise that using a 32-bit userland with LIB32 would allow
> me to share the compiles and use just the plain system gcc on the x86
> machines, but as of yet not all possible 64-bit errors have been
> removed from KDE, so I do want to be building in 64-bit mode.
I attempted the same thing with distcc a while back, trying to farm the
builds between my athlon 64 and athlon boxes, but hit the same snag as
you, and was stymied as to how to proceed. I'd certainly like to know
if there's any way to get this to work. Please followup to the list if
you find out anything useful!
Conrad J. Sabatier <conrads at cox.net> -- "In Unix veritas"
More information about the freebsd-amd64