summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorAndrew Childs <lorne@cons.org.nz>2018-03-06 23:18:10 +0900
committerAndrew Childs <lorne@cons.org.nz>2018-03-07 11:46:55 +0900
commit4c76a21aae4299b3ec980f0f56e2d7f2860a8826 (patch)
tree86240bdab1e80bd3f9bc4624a1c5d0b41224faeb /pkgs/development
parentdc1e064612ed2fee3e1ae428453641485ad8b759 (diff)
downloadnixlib-4c76a21aae4299b3ec980f0f56e2d7f2860a8826.tar
nixlib-4c76a21aae4299b3ec980f0f56e2d7f2860a8826.tar.gz
nixlib-4c76a21aae4299b3ec980f0f56e2d7f2860a8826.tar.bz2
nixlib-4c76a21aae4299b3ec980f0f56e2d7f2860a8826.tar.lz
nixlib-4c76a21aae4299b3ec980f0f56e2d7f2860a8826.tar.xz
nixlib-4c76a21aae4299b3ec980f0f56e2d7f2860a8826.tar.zst
nixlib-4c76a21aae4299b3ec980f0f56e2d7f2860a8826.zip
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.
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/tools/misc/gdb/darwin-target-match.patch11
-rw-r--r--pkgs/development/tools/misc/gdb/default.nix3
2 files changed, 13 insertions, 1 deletions
diff --git a/pkgs/development/tools/misc/gdb/darwin-target-match.patch b/pkgs/development/tools/misc/gdb/darwin-target-match.patch
new file mode 100644
index 000000000000..1328d919503a
--- /dev/null
+++ b/pkgs/development/tools/misc/gdb/darwin-target-match.patch
@@ -0,0 +1,11 @@
+--- a/configure	2017-06-05 00:51:26.000000000 +0900
++++ b/configure	2018-03-06 23:12:58.000000000 +0900
+@@ -3603,7 +3603,7 @@
+     noconfigdirs="$noconfigdirs ld gprof"
+     noconfigdirs="$noconfigdirs sim target-rda"
+     ;;
+-  x86_64-*-darwin[912]*)
++  x86_64-*-darwin*)
+     noconfigdirs="$noconfigdirs ld gas gprof"
+     noconfigdirs="$noconfigdirs sim target-rda"
+     ;;
diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix
index e068b908caf4..b5840d074668 100644
--- a/pkgs/development/tools/misc/gdb/default.nix
+++ b/pkgs/development/tools/misc/gdb/default.nix
@@ -35,7 +35,8 @@ stdenv.mkDerivation rec {
     sha256 = "0d2bpqk58fqlx21rbnk8mbcjlggzc9kb5sjirrfrrrjq70ka0qdg";
   };
 
-  patches = [ ./debug-info-from-env.patch ];
+  patches = [ ./debug-info-from-env.patch ]
+    ++ stdenv.lib.optional stdenv.isDarwin ./darwin-target-match.patch;
 
   nativeBuildInputs = [ pkgconfig texinfo perl setupDebugInfoDirs ]
     # TODO(@Ericson2314) not sure if should be host or target