From dba65df0349cf251084a5182c60da58a6a73cc5a Mon Sep 17 00:00:00 2001 From: volth Date: Wed, 24 Apr 2019 20:29:45 +0000 Subject: [PATCH] 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) --- pkgs/build-support/cc-wrapper/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 84548a6b1dfb..b52852a0f63e 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -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