From 95c412ab61923c4bedc263a53e98d46c6ac9b426 Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Fri, 7 Jun 2019 17:46:33 -0400 Subject: [PATCH] lkl: fix cross --- pkgs/applications/virtualization/lkl/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/virtualization/lkl/default.nix b/pkgs/applications/virtualization/lkl/default.nix index d870e2466167..40503ab89d70 100644 --- a/pkgs/applications/virtualization/lkl/default.nix +++ b/pkgs/applications/virtualization/lkl/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchFromGitHub, bc, python, bison, flex, fuse, libarchive }: +{ stdenv, fetchFromGitHub, bc, python, bison, flex, fuse, libarchive +, buildPackages }: stdenv.mkDerivation rec { name = "lkl-2018-08-22"; @@ -40,7 +41,12 @@ stdenv.mkDerivation rec { # crypto/jitterentropy.c:54:3: error: #error "The CPU Jitter random number generator must not be compiled with optimizations. See documentation. Use the compiler switch -O0 for compiling jitterentropy.c." hardeningDisable = [ "format" "fortify" ]; - makeFlags = "-C tools/lkl"; + makeFlags = [ + "-C tools/lkl" + "CC=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc" + "HOSTCC=${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc" + "CROSS_COMPILE=${stdenv.cc.targetPrefix}" + ]; enableParallelBuilding = true;