treewide: Remove usage of remaining redundant platform compatability stuff

Want to get this out of here for 18.09, so it can be deprecated
thereafter.
This commit is contained in:
John Ericson
2018-08-30 17:20:32 -04:00
parent 2c2f1e37d4
commit 0828e2d8c3
149 changed files with 545 additions and 603 deletions
+5 -7
View File
@@ -1,6 +1,4 @@
{ stdenv, fetchurl, linuxHeaders, perl
, buildPlatform, hostPlatform
}:
{ stdenv, fetchurl, linuxHeaders, perl }:
let
commonMakeFlags = [
@@ -25,12 +23,12 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "format" "stackprotector" ];
makeFlags = commonMakeFlags ++ [
"KLIBCARCH=${hostPlatform.platform.kernelArch}"
"KLIBCARCH=${stdenv.hostPlatform.platform.kernelArch}"
"KLIBCKERNELSRC=${linuxHeaders}"
] # TODO(@Ericson2314): We now can get the ABI from
# `hostPlatform.parsed.abi`, is this still a good idea?
++ stdenv.lib.optional (hostPlatform.platform.kernelArch == "arm") "CONFIG_AEABI=y"
++ stdenv.lib.optional (hostPlatform != buildPlatform) "CROSS_COMPILE=${stdenv.cc.targetPrefix}";
# `stdenv.hostPlatform.parsed.abi`, is this still a good idea?
++ stdenv.lib.optional (stdenv.hostPlatform.platform.kernelArch == "arm") "CONFIG_AEABI=y"
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "CROSS_COMPILE=${stdenv.cc.targetPrefix}";
# Install static binaries as well.
postInstall = ''