kernel: fix cross-build

Fix for #59225 regression proposed by @matthewbauer
https://github.com/NixOS/nixpkgs/pull/59225#issuecomment-486398003

(cherry picked from commit a6ea72a77d1f8e794244b063a7e9780c1b47486d)
This commit is contained in:
volth 2019-04-24 20:29:45 +00:00 committed by Matthew Bauer
parent 27a9fdb6ff
commit dba65df034

View File

@ -320,8 +320,8 @@ stdenv.mkDerivation {
# -mfloat-abi only matters on arm32 but we set it here
# unconditionally just in case. If the abi specifically sets hard
# vs. soft floats we use it here.
+ optionalString (targetPlatform ? platform.gcc.float-abi || targetPlatform.parsed.abi ? float) ''
echo "-mfloat-abi=${targetPlatform.platform.gcc.float-abi or targetPlatform.parsed.abi.float}" >> $out/nix-support/cc-cflags-before
+ optionalString (targetPlatform ? platform.gcc.float-abi) ''
echo "-mfloat-abi=${targetPlatform.platform.gcc.float-abi}" >> $out/nix-support/cc-cflags-before
''
+ optionalString (targetPlatform ? platform.gcc.fpu) ''
echo "-mfpu=${targetPlatform.platform.gcc.fpu}" >> $out/nix-support/cc-cflags-before