From 3d8133c572d44075b5cf385bf11dc5f8bbeece55 Mon Sep 17 00:00:00 2001 From: Ben Siraphob Date: Sun, 2 Nov 2025 22:46:17 -0800 Subject: [PATCH] gccNGPackages.libbacktrace: fix tests on darwin The libbacktrace test suite was failing on darwin because the btest_gnudebuglink tests attempted to use GNU debuglink functionality, which only works on ELF binaries, not Mach-O on darwin. We set `libbacktrace_cv_objcopy_debuglink=no`, allowing the remaining 21 tests to run successfully. --- .../compilers/gcc/ng/common/libbacktrace/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/compilers/gcc/ng/common/libbacktrace/default.nix b/pkgs/development/compilers/gcc/ng/common/libbacktrace/default.nix index 33b817420035..307a7061bc57 100644 --- a/pkgs/development/compilers/gcc/ng/common/libbacktrace/default.nix +++ b/pkgs/development/compilers/gcc/ng/common/libbacktrace/default.nix @@ -47,6 +47,11 @@ stdenv.mkDerivation (finalAttrs: { mkdir ../../build cd ../../build configureScript=../$sourceRoot/configure + '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' + # GNU debuglink is not supported on macOS (Mach-O format) + # Skip the gnudebuglink tests which fail on Darwin + export libbacktrace_cv_objcopy_debuglink=no ''; installPhase = ''