From 6807ea7973ce6b099761295c497357d7e6866f43 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Fri, 19 Jan 2024 14:14:42 -0500 Subject: [PATCH] linuxptp: Fix cross-compilation Linux-PTP uses a kernel-like build system which requires that the `CROSS_COMPILE` variable be set to the target prefix when cross-compiling. --- pkgs/os-specific/linux/linuxptp/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/linuxptp/default.nix b/pkgs/os-specific/linux/linuxptp/default.nix index 27a9ccb3303f..de215024555d 100644 --- a/pkgs/os-specific/linux/linuxptp/default.nix +++ b/pkgs/os-specific/linux/linuxptp/default.nix @@ -15,7 +15,10 @@ stdenv.mkDerivation rec { '/usr/include/linux/' "${linuxHeaders}/include/linux/" ''; - makeFlags = [ "prefix=" ]; + makeFlags = [ + "prefix=" + "CROSS_COMPILE=${stdenv.cc.targetPrefix}" + ]; preInstall = '' export DESTDIR=$out