Cross-compiling on x86 to amd64

a.degroot at a.degroot at
Tue Nov 23 03:45:07 PST 2004

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 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
	amd64box$ g++

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.

As of September 1st, 2004, the University of Nijmegen will _still_ be the
University of Nijmegen, but with a different nonsensical adjective in front.
    Reach me at groot at instead. GPG FEA2 A3FE

More information about the freebsd-amd64 mailing list