As I understand, to have gcc on an armv5 board compiling executables while using my x86 machine to compile that arm native gcc, I need this setup:
- Machine configuring the toolchain components: the config machine : x86_64
- Machine building the toolchain components: the build machine : x86_64
- Machine running the toolchain: the host machine : ARM
- Machine the toolchain is generating code for: the target machine : ARM
Based on reading the cross-ng docs here, I should use a cross-native setup, but when I attempt to enable that using ct-ng menuconfig
I need to enable:
experimental in
Paths and misc options -> Try features marked as EXPERIMENTAL
Toolchain options -> Type (Cross) -> Cross-native (NO CODE!) (EXPERIMENTAL)
But of course Cross-Native doesn't work since there is no code for it. Googling leads me to this and this discussion on a mailing list saying that I should try to do this using a Canadian build style but I am somewhat lost as to what tuple's and whatnot to use for the Build System
and Host System
in crosstool-ng's menuconfig, or if this is still the correct way to go considering how both discussions are over 3 years old.
This post on SO seems to imply that the build system and host system tuples should be arm-unknown-linux-gnueabi
?
To be clear, I have been able to compile and run executables using a cross compiler generated from crosstool-ng already, now I want to have a compiler on that armv5 system.
Edit: So I just added the normal cross compiler (arm-unknown-linux-gnueabi
) generated by crosstools-ng to the tuple in Toolchain options -> General toolchain options -> Host system -> Tuple
and was able to compile gcc as well as have it execute on the arm. Example
I now just need to fix the library situation and that should be that.