Provide a standalone toolchain using buildroot
Buildroot is great to make a full Linux system from sources. Nevertheless, the toolchain is a special part in building process:
- Compilation is very long
- Compilation is difficult to stop and restart
- We rarely recompile toolchain
- We want to provide toolchain as a standalone package without Buildroot
Some advice about toolchain making under Buildroot:
- Use crosstool-ng. Buildroot support internal toolchain building, but crosstool-ng is specialized in toolchain building. Toolchain depends less of their installation path and there are more options
- Use build out of tree (pass
O=option to make). Since toolchains compilation is long, always test in a new fresh directory without break your current work.
CONFIG_BR2_HOST_DIR. Toolchains depend often of their build path. It is not great to ask to end user to copy toolchain in
/opt/arm-mycompagny-linux-eabiis a far better choice.
$BR2_HOST_DIRwill contain a full BSP. Just do "make uclibc" if you only want toolchain with headers from C library. Make an archive just after this step
- Write two configurations for your board: One compile toolchain and other one use external toolchain.
- Once your rootfs boot, add dropbear to your system and run gcc testsuite. It is really easy to run and guaranty again some bugs like badly configured floating units, bad exception catching, etc...