linux: use absolute paths for compilers
HOSTCC was taking precedence before stdenv's normal CC, at least in case of non-cross build.
This commit is contained in:
parent
040bde9052
commit
3d24c5eecc
@ -266,8 +266,10 @@ stdenv.mkDerivation ((drvAttrs config hostPlatform.platform kernelPatches config
|
|||||||
|
|
||||||
hardeningDisable = [ "bindnow" "format" "fortify" "stackprotector" "pic" ];
|
hardeningDisable = [ "bindnow" "format" "fortify" "stackprotector" "pic" ];
|
||||||
|
|
||||||
|
# Absolute paths for compilers avoid any PATH-clobbering issues.
|
||||||
makeFlags = commonMakeFlags ++ [
|
makeFlags = commonMakeFlags ++ [
|
||||||
"HOSTCC=${buildPackages.stdenv.cc.targetPrefix}gcc"
|
"CC=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc"
|
||||||
|
"HOSTCC=${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc"
|
||||||
"ARCH=${stdenv.hostPlatform.platform.kernelArch}"
|
"ARCH=${stdenv.hostPlatform.platform.kernelArch}"
|
||||||
] ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
|
] ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||||
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
|
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user