Cross-compiling amd64 on x86

groot at kde.org groot at kde.org
Thu Nov 25 15:07:59 PST 2004


Unfortunately, buying a second amd64 system is faster than figuring out how to 
cross compile (and less aggravating, too), so that's what I've done. I 
followed a number of links around (http://www.kegel.com/crosstool/), but 
there is nothing really comprehensive nor anything simple and 
straightforward. I did hack the ports Makefile a little to allow me to set 
the target architecture, and indeed, it does build _a_ gcc for amd64 then, 
but the bootstrapping process then tries to use that amd64 compiler to build 
itself - on x86, which fails. So there's two issues: 

- getting binutils for amd64 built on x86. This is not addressed by messing 
with the existing ports.

- getting gcc built and doing only the first-stage of the bootstrap.

The latter should be fairly simple for someone who understands the build 
process for gcc; the port itself provides a useful invocation of configure 
that you would need to modify. binutils is another can of worm(let)s, but 
that URL above suggests that this might even happen automatically if you 
unpack them into the gcc source tree.


More information about the freebsd-amd64 mailing list