Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

gdb: Flexible target matching for darwin

Outside of the nix-build the target is `x86_64-apple-darwin17.4.0`,
while inside the target is `x86_64-apple-darwin`. This difference
causes the fallback target configuration for darwin, which disables
gdb. Add a patch to make the target matching more flexible.

(cherry picked from commit 4c76a21aae4299b3ec980f0f56e2d7f2860a8826)
(cherry picked from commit fe0728fa2cf5b0e971a829d30182f04331d26c18)

authored by

Andrew Childs and committed by
Daiderd Jordan
17ff10ab 82bb0a18

+13 -1
+11
pkgs/development/tools/misc/gdb/darwin-target-match.patch
··· 1 + --- a/configure 2017-06-05 00:51:26.000000000 +0900 2 + +++ b/configure 2018-03-06 23:12:58.000000000 +0900 3 + @@ -3603,7 +3603,7 @@ 4 + noconfigdirs="$noconfigdirs ld gprof" 5 + noconfigdirs="$noconfigdirs sim target-rda" 6 + ;; 7 + - x86_64-*-darwin[912]*) 8 + + x86_64-*-darwin*) 9 + noconfigdirs="$noconfigdirs ld gas gprof" 10 + noconfigdirs="$noconfigdirs sim target-rda" 11 + ;;
+2 -1
pkgs/development/tools/misc/gdb/default.nix
··· 35 35 sha256 = "0d2bpqk58fqlx21rbnk8mbcjlggzc9kb5sjirrfrrrjq70ka0qdg"; 36 36 }; 37 37 38 - patches = [ ./debug-info-from-env.patch ]; 38 + patches = [ ./debug-info-from-env.patch ] 39 + ++ stdenv.lib.optional stdenv.isDarwin ./darwin-target-match.patch; 39 40 40 41 nativeBuildInputs = [ pkgconfig texinfo perl setupDebugInfoDirs ] 41 42 # TODO(@Ericson2314) not sure if should be host or target