From 0ac6d4aeb6ae3cb2bd1ad402fd165396e263c251 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Sat, 24 Feb 2018 22:15:48 -0500 Subject: [PATCH] gnu-efi: Fix aarch64 cross-build --- lib/systems/inspect.nix | 3 ++- pkgs/development/libraries/gnu-efi/default.nix | 15 ++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix index fd4128c586df..63311a9703de 100644 --- a/lib/systems/inspect.nix +++ b/lib/systems/inspect.nix @@ -38,7 +38,8 @@ rec { Kexecable = map (family: { kernel = kernels.linux; cpu.family = family; }) [ "x86" "arm" "aarch64" "mips" ]; - Efi = map (family: { cpu.family = family; }) [ "x86" "arm" ]; + Efi = map (family: { cpu.family = family; }) + [ "x86" "arm" "aarch64" ]; }; matchAnyAttrs = patterns: diff --git a/pkgs/development/libraries/gnu-efi/default.nix b/pkgs/development/libraries/gnu-efi/default.nix index 6691928c021e..a46abe3b4f7c 100644 --- a/pkgs/development/libraries/gnu-efi/default.nix +++ b/pkgs/development/libraries/gnu-efi/default.nix @@ -15,13 +15,14 @@ stdenv.mkDerivation rec { makeFlags = [ "PREFIX=\${out}" - "CC=gcc" - "AS=as" - "LD=ld" - "AR=ar" - "RANLIB=ranlib" - "OBJCOPY=objcopy" - ] ++ stdenv.lib.optional stdenv.isArm "ARCH=arm"; + "CC=${stdenv.cc.targetPrefix}gcc" + "AS=${stdenv.cc.targetPrefix}as" + "LD=${stdenv.cc.targetPrefix}ld" + "AR=${stdenv.cc.targetPrefix}ar" + "RANLIB=${stdenv.cc.targetPrefix}ranlib" + "OBJCOPY=${stdenv.cc.targetPrefix}objcopy" + ] ++ stdenv.lib.optional stdenv.isArm "ARCH=arm" + ++ stdenv.lib.optional stdenv.isAarch64 "ARCH=aarch64"; meta = with stdenv.lib; { description = "GNU EFI development toolchain";