Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
WIP: treewide: Always prefix compilers #44583
Motivation for this change
The goal is to bring the native and cross code paths closer together by always prefixing compilers. This makes it easier to catch programs that hard-code
This also includes:
The whole thing I plan to merge after 18.09, but maybe those 2 bits can go in first.
GNU tools are prefixed the same whether wrapped or not, but unwrapped LLVM tools are not prefixed because they are multi-target.
It's confusing when the linker and assembler appear to come from cc-wrapper rather than bintools-wrapper.
This isn't a MUSL thing, but just needed for cross compilation to x86. No one had tried this when all cross compilation was to linux + glibc, hence why no one noticed this until recently.
Carefully fake cc-version and cc-fullversion to avoid needing a compiler for the kernel itself to build the headers.
The unwrapped bintools are already propagated dependencies, and therefore on the PATH of downstream builds, cc-wrapper can get the assembler on its own.
I completely agree with the gain offered by always prefixing the compilers in stdenv: it is the removal of another source of impurity (the host system), which is what nix is all about.
However, a cursory read (which can easily be wrong) makes me think
It looks like there hasn't been any updates on this in a year, so I will close it.
(@Ericson2314 sorry in advance if you're still working on any of these PRs that I've closed. Definitely don't hesitate to re-open. I've been trying to clean up old PRs tagged