Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Following the OS-Faq guide to building a cross compiler, I've come upon many problems.
Up until this one, I have seen easy fixes. This one I just plain have no idea. As a note:
I have over-ridden the target host machine to be i686-unknown-cygwin, as it detects x86_64-unknown-cygwin, and GCC reports (after doing all the checks...) it doesn't compile for x86_64. I'm compiling GCC 3.4.0, and this is the output I get from it:
I assume that Cygwin installs the same binaries (i686) even when installed on a x86_64 machine. (You could check that with gcc -v.)
That would make what you are trying to do a "Canadian Cross": Using a i686-pc-cygwin compiler to build a compiler that runs on x86_64-unknown-cygwin and generates binaries for... whatever.
My first solution would be to reduce the problem to a "normal" cross-compiler: Do you really need the binutils and GCC to be hosted on x86_64-unknown-cygwin? Wouldn't a "standard" i686 build, without overriding --host, suffice?
I know all about the desire to build the "best", but "best" includes "working"... and I have no chance to reproduce your problem since I don't have a x86_64 machine at my disposal.
Candy might have, though - he tinkered with 64/32bit cross-setups some time ago.
Every good solution is obvious once you've found it.
Solar wrote:
Candy might have, though - he tinkered with 64/32bit cross-setups some time ago.
If only I did. Santa wasn't nice to me (or I wasn't nice enough - can't figure out which) so I didn't get an AMD64 computer. I've only been playing in the Bochs sandbox. Got a bootloader working and I've got the crosscompiler for normal -> OSdev AMD64 working so I can at least see if my code compiles (I usually don't make very complex errors so the compiler can rip them out. When I do make a complex error it's usually so complex that it takes days to figure out in any case, so it doesn't matter).
Canadian Cross? Sure, with the binutils. But I didn't override the host with that one. On GCC, if I didn't, it stopped halfway in compile saying it didn't support compiling for x86_64. The host override tells it to install i686 binaries:
--host=i686-unknown-cygwin
*edit*
OMG...can't beleive I spelled 'sure' as 'shure'.....
I played and around with it and somehow it worked...I used the same options I think. Whatever happened, I don't know.
Oh, and I just got my dual-channel 1GB RAM in. It's schweet. My PC has 30 processes running and 8 icons in the systray...And it started up (literally from pressing the power button) in under 15 seconds. Gotta love it.
*edit*
By start up, I mean, logged in, at the desktop, everything loaded.