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
expose gcov, gcc-ar, gcc-ranlib and others gcc tools in gcc-wrapper (fixes #86272) #88202
Motivation for this change
This commit fixes #86272. For full description, see the original bug report. It can be summarized as: previously NixOS didn't provide any gcc tools (like gcov, gcc-ar, gcc-ranlib and others).
I have tested this changes locally on a slightly outdated version (19.09) and now I cherry-picked them on top of master (there was a conflict). I haven't rebuilt master because compilation on my laptop takes days.
Thank you. I didn't know that there was a similar issue in binutils and it was already solved. I like the solution with priorities more than symlinking, because it doesn't require enumerating all the programs. In theory it may work properly even if new commands are added/removed.
Looks like what is needed is:
I'm afraid I don't quite understand how these priorities work for bintuils. In pkgs/development/tools/misc/binutils/default.nix I see this line:
Ok, 10 is priority for unwrapped binutils. But then in pkgs/build-support/bintools-wrapper/default.nix (as I understand wrapper for bintuils) we have this:
So the priority is set to 10 too. I think I don't quite understand how wrapped bintutils get higher priority than unwrapped.
Oh, I thought this was about during builds too, but I see with https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/cc-wrapper/setup-hook.sh#L91-L94 (and a corresponding line in
I can't say I understand that thing in the meta either, but maybe just try it? If it works for one it should work for the other, right?