about summary refs log tree commit diff
path: root/pkgs/os-specific/bsd
diff options
context:
space:
mode:
authorRyan Burns <rtburns@protonmail.com>2024-01-02 20:29:57 -0800
committerRyan Burns <rtburns@protonmail.com>2024-01-02 20:29:57 -0800
commitb79cbf32ea6cb223bebc5f731494565f7b880e36 (patch)
tree10f6e205393b1b109e7df5321e3b3b40b73de85d /pkgs/os-specific/bsd
parent699f060b12a9689797dacdafdbc0932ef43d326b (diff)
freebsd.libc: fix build with LLVM 16+
Diffstat (limited to 'pkgs/os-specific/bsd')
-rw-r--r--pkgs/os-specific/bsd/freebsd/default.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/os-specific/bsd/freebsd/default.nix b/pkgs/os-specific/bsd/freebsd/default.nix
index ff9f4d911f03d..398b2ff6fa6dc 100644
--- a/pkgs/os-specific/bsd/freebsd/default.nix
+++ b/pkgs/os-specific/bsd/freebsd/default.nix
@@ -717,6 +717,10 @@ in makeScopeWithSplicing' {
     buildInputs = with self; [ include csu ];
     env.NIX_CFLAGS_COMPILE = "-B${self.csu}/lib";
 
+    # Suppress lld >= 16 undefined version errors
+    # https://github.com/freebsd/freebsd-src/commit/2ba84b4bcdd6012e8cfbf8a0d060a4438623a638
+    env.NIX_LDFLAGS = lib.optionalString (stdenv.targetPlatform.linker == "lld") "--undefined-version";
+
     makeFlags = [
       "STRIP=-s" # flag to install, not command
       # lib/libc/gen/getgrent.c has sketchy cast from `void *` to enum