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.
This commit is contained in:
Ben Siraphob
2025-11-02 22:56:41 -08:00
parent 541cfb092c
commit 3d8133c572
@@ -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 = ''