From 35a0e15ff658f4bdb38639e25149e98e006304f3 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sat, 15 May 2021 22:24:17 +0000 Subject: [PATCH] bintools: fix dynamic linker for NetBSD cross This will fail with an assertion error on native NetBSD, but it wouldn't have worked anyway. We can fix that later. --- pkgs/build-support/bintools-wrapper/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index 74681aaedcca..bf81d00e5ea7 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -9,11 +9,22 @@ , lib , stdenvNoCC , bintools ? null, libc ? null, coreutils ? null, shell ? stdenvNoCC.shell, gnugrep ? null -, sharedLibraryLoader ? if libc == null then null else lib.getLib libc +, netbsd ? null, netbsdCross ? null +, sharedLibraryLoader ? + if libc == null then + null + else if stdenvNoCC.targetPlatform.isNetBSD then + if libc != targetPackages.netbsdCross.headers then + targetPackages.netbsdCross.ld_elf_so + else + null + else + lib.getLib libc , nativeTools, noLibc ? false, nativeLibc, nativePrefix ? "" , propagateDoc ? bintools != null && bintools ? man , extraPackages ? [], extraBuildCommands ? "" , buildPackages ? {} +, targetPackages ? {} , useMacosReexportHack ? false # Darwin code signing support utilities