Build with external tool chain is 1.5x slower than with compiled toolchain

Why would building with the project's external toolchain be 1.5x slower than with a toolchain the build system built? I used the identical .config and run each build twice.

External toolchain: around 17m 30s
Built toolchain: around 11m 0s

One reason might be that gcc and ld are invoked through wrapper scripts which do add considerable overhead.

The external toolchain feature is not a performance optimization but rather a way to build OpenWrt using proprietary vendor toolchains, e.g. to build for unsupported SoCs.

3 Likes