linux: don't add HOSTCC to PATH during build#34882
Conversation
|
Verified that now it's really effective (non-cross): And |
|
Failure on x86_64-darwin (full log) Partial log (click to expand)
|
|
Success on aarch64-linux (full log) Partial log (click to expand)
|
|
It also fixes the regressed build of |
|
Failure on x86_64-linux (full log) Partial log (click to expand)
|
|
@vcunat for a non-cross build, This makes |
|
@Ericson2314: the problem is with overridability. We have Why doesn't it exist? For me it resolves to working gcc for non-cross build (i.e. "native", right?), and I thought it's the correct version for cross builds also. |
Ok makes sense. And I'm warming to your solution, actually :). At first I thought you needed to exploit a native-only special case, and that gave me pause. But actually, you were hampered by a native-only special case, namely that two different compilers were clobbering each other.
Nevermind, it does exists but it wouldn't for cross. You'd have to do "HOSTCC=${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc" |
|
@vcunat So the thing is, though, it's sketch to not have the How about we define |
|
You mean this way ^^ ? |
There was a problem hiding this comment.
still need the stdenv.cc.targetPrefix like below, but otherwise good. Thanks!
There was a problem hiding this comment.
OK, I assumed stdenv.cc is always prefix-less.
|
Failure on x86_64-darwin (full log) Partial log (click to expand)
|
HOSTCC was taking precedence before stdenv's normal CC, at least in case of non-cross build.
8070efb to
3d24c5e
Compare
|
Failure on x86_64-darwin (full log) Partial log (click to expand)
|
Ericson2314
left a comment
There was a problem hiding this comment.
I went ahead and just made the one change, so merge whenever @vcunat!
|
Success on aarch64-linux (full log) Partial log (click to expand)
|
|
Success on aarch64-linux (full log) Partial log (click to expand)
|
|
Failure on x86_64-linux (full log) Partial log (click to expand)
|
|
Uh, I accidentally re-pushed again, deleting your comment in the file, but otherwise the contents should be the same. Feel free to overwrite it again :-) (GitHub seems to have lost the commit immediately.) I have a setup that force-mirrors all branches that match a pattern, and sometimes this bites me. |
8070efb to
3d24c5e
Compare
|
No worries, easy to force push. |
|
Success on aarch64-linux (full log) Partial log (click to expand)
|
|
Failure on x86_64-darwin (full log) Partial log (click to expand)
|
|
Failure on x86_64-linux (full log) Partial log (click to expand)
|
This is needed to really build linux with gcc7 after ae04052.
|
Failure on x86_64-linux (full log) Partial log (click to expand)
|
It was taking precedence before stdenv's normal CC, at least in case of non-cross build.
Motivation for this change
Finishing the retpoline workaround, hopefully without breaking cross-compilation.
Things done
build-use-sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)