go: only set CC when cross-compiling
This avoids he default CC for cgo being hardcoded, when we only want to overwrite it during compilation.
This commit is contained in:
parent
cee7631c08
commit
81a8b76b3a
@ -186,8 +186,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
export PATH=$(pwd)/bin:$PATH
|
||||
|
||||
${optionalString (stdenv.buildPlatform != stdenv.targetPlatform) ''
|
||||
# Independent from host/target, CC should produce code for the building system.
|
||||
# We only set it when cross-compiling.
|
||||
export CC=${buildPackages.stdenv.cc}/bin/cc
|
||||
''}
|
||||
ulimit -a
|
||||
'';
|
||||
|
||||
|
@ -193,8 +193,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
export PATH=$(pwd)/bin:$PATH
|
||||
|
||||
${optionalString (stdenv.buildPlatform != stdenv.targetPlatform) ''
|
||||
# Independent from host/target, CC should produce code for the building system.
|
||||
# We only set it when cross-compiling.
|
||||
export CC=${buildPackages.stdenv.cc}/bin/cc
|
||||
''}
|
||||
ulimit -a
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user