From 0f456ce6277333ea2d2f20eab8f910ac36c4d292 Mon Sep 17 00:00:00 2001 From: Robert Kovacsics Date: Sun, 7 Aug 2022 21:42:25 +0100 Subject: [PATCH] pkgsStatic.gdb: Fix compile Fixes the following issue: [host@user:/nix/pkgs]$ nix build .\#pkgsStatic.gdb checking size of unsigned long long... CXXLD libinproctrace.so /nix/store/gzms61swp55fg5qbvshyqv5jfsnfvybz-x86_64-unknown-linux-musl-binutils-2.38/bin/x86_64-unknown-linux-musl-ld: /nix/store/dnmh1aj0kd60qz8yl4srak8kn2bspbxc-x86_64-unknown-linux-musl-stage-final-gcc-11.3.0/lib/gcc/x86_64-unknown-linux-musl/11.3.0/crtbeginT.o: relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a shared object /nix/store/gzms61swp55fg5qbvshyqv5jfsnfvybz-x86_64-unknown-linux-musl-binutils-2.38/bin/x86_64-unknown-linux-musl-ld: failed to set dynamic section sizes: bad value collect2: error: ld returned 1 exit status make[2]: *** [Makefile:383: libinproctrace.so] Error 1 make[2]: *** Waiting for unfinished jobs.... 8 checking size of unsigned long... make[2]: Leaving directory '/build/gdb-12.1/_build/gdbserver' make[1]: *** [Makefile:11064: all-gdbserver] Error 2 as the inprocess library can only be compiled as a shared library --- pkgs/development/tools/misc/gdb/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix index d9b56428f5cc..6b5c2ba42f8d 100644 --- a/pkgs/development/tools/misc/gdb/default.nix +++ b/pkgs/development/tools/misc/gdb/default.nix @@ -102,6 +102,7 @@ stdenv.mkDerivation rec { "--with-auto-load-safe-path=${builtins.concatStringsSep ":" safePaths}" ] ++ lib.optional (!pythonSupport) "--without-python" ++ lib.optional stdenv.hostPlatform.isMusl "--disable-nls" + ++ lib.optional stdenv.hostPlatform.isStatic "--disable-inprocess-agent" ++ lib.optional enableDebuginfod "--with-debuginfod=yes"; postInstall =