Merge #34882: linux: use absolute paths for compilers

This is needed to really build linux with gcc7 after ae040525d.
This commit is contained in:
Vladimír Čunát 2018-02-12 22:20:31 +01:00
commit 5e62091c45
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -266,8 +266,10 @@ stdenv.mkDerivation ((drvAttrs config hostPlatform.platform kernelPatches config
hardeningDisable = [ "bindnow" "format" "fortify" "stackprotector" "pic" ];
# Absolute paths for compilers avoid any PATH-clobbering issues.
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}"
] ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"