toolchain/wrappers.nix
| pkgs | |
| filc | |
| filc-sysroot | |
| filc-binutils | |
| useCcache | default true |
ccache wrapper with version script handling
The role salt of the wrappers' environment variables (NIX_CFLAGS_COMPILE_<salt>, NIX_LDFLAGS_<salt>, NIX_CC_WRAPPER_TARGET_HOST_<salt>, ...). Nixpkgs derives it from the target platform, and pkgs is the build platform's package set, so the Fil-C wrappers got the native wrappers' salt. Each then accepted the other's flags: libraries in nativeBuildInputs came first in Fil-C links, and Fil-C libraries reached depsBuildBuild compilers' links. Use the Fil-C platform's salt (flake.nix: crossSystem.config) and keep the empty target prefix. checks.wrapper-roles tests the separation.
passthru = {
};
Let Nixpkgs apply its Clang-specific handling to Fil-C's Clang.
There is no GCC tree to use for libraries; callPackage would otherwise supply the top-level gccForLibs.
The ccache wrapper rewrites version-script flags, which a response file would hide from it.
Keep ABI-specific build-system integration outside the expensive compiler and runtime derivations. nm itself continues to report real ELF symbols.