diff options
author | Lancelot SIX <lsix@lancelotsix.com> | 2020-02-10 14:52:49 +0100 |
---|---|---|
committer | Frederik Rietdijk <freddyrietdijk@fridh.nl> | 2020-03-06 07:04:07 +0100 |
commit | 4e085866902a33d6989fab6fe444dda062f755ba (patch) | |
tree | 96eeaf24dcceae77634d1732b224fcf972e8bd22 /pkgs/development/tools | |
parent | bb0d036002eadcf1080bdcc258074c5a7a8693a4 (diff) | |
download | nixlib-4e085866902a33d6989fab6fe444dda062f755ba.tar nixlib-4e085866902a33d6989fab6fe444dda062f755ba.tar.gz nixlib-4e085866902a33d6989fab6fe444dda062f755ba.tar.bz2 nixlib-4e085866902a33d6989fab6fe444dda062f755ba.tar.lz nixlib-4e085866902a33d6989fab6fe444dda062f755ba.tar.xz nixlib-4e085866902a33d6989fab6fe444dda062f755ba.tar.zst nixlib-4e085866902a33d6989fab6fe444dda062f755ba.zip |
gdb: 8.3.1 -> 9.1
See https://www.gnu.org/software/gdb/download/ANNOUNCEMENT for release information
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r-- | pkgs/development/tools/misc/gdb/darwin-target-match.patch | 2 | ||||
-rw-r--r-- | pkgs/development/tools/misc/gdb/debug-info-from-env.patch | 33 | ||||
-rw-r--r-- | pkgs/development/tools/misc/gdb/default.nix | 13 |
3 files changed, 32 insertions, 16 deletions
diff --git a/pkgs/development/tools/misc/gdb/darwin-target-match.patch b/pkgs/development/tools/misc/gdb/darwin-target-match.patch index 1328d919503a..978a67950569 100644 --- a/pkgs/development/tools/misc/gdb/darwin-target-match.patch +++ b/pkgs/development/tools/misc/gdb/darwin-target-match.patch @@ -1,6 +1,6 @@ --- a/configure 2017-06-05 00:51:26.000000000 +0900 +++ b/configure 2018-03-06 23:12:58.000000000 +0900 -@@ -3603,7 +3603,7 @@ +@@ -3644,7 +3644,7 @@ noconfigdirs="$noconfigdirs ld gprof" noconfigdirs="$noconfigdirs sim target-rda" ;; diff --git a/pkgs/development/tools/misc/gdb/debug-info-from-env.patch b/pkgs/development/tools/misc/gdb/debug-info-from-env.patch index 499b61ba8696..de59bd2d17bb 100644 --- a/pkgs/development/tools/misc/gdb/debug-info-from-env.patch +++ b/pkgs/development/tools/misc/gdb/debug-info-from-env.patch @@ -1,15 +1,24 @@ -Initialize debug-file-directory from NIX_DEBUG_INFO_DIRS, a colon-separated list -of directories with separate debugging information files. - ---- a/gdb/main.c -+++ b/gdb/main.c -@@ -556,3 +556,8 @@ captured_main_1 (struct captured_main_args *context) +diff -ur a/gdb/main.c b/gdb/main.c +--- a/gdb/main.c 2020-02-08 13:50:14.000000000 +0100 ++++ b/gdb/main.c 2020-02-24 10:02:07.731806739 +0100 +@@ -567,9 +567,17 @@ + gdb_sysroot = xstrdup (TARGET_SYSROOT_PREFIX); + } -- debug_file_directory = relocate_gdb_directory (DEBUGDIR, -+ debug_file_directory = getenv("NIX_DEBUG_INFO_DIRS"); -+ +- debug_file_directory +- = xstrdup (relocate_gdb_directory (DEBUGDIR, +- DEBUGDIR_RELOCATABLE).c_str ()); ++ debug_file_directory = getenv ("NIX_DEBUG_INFO_DIRS"); + if (debug_file_directory != NULL) -+ debug_file_directory = xstrdup(debug_file_directory); ++ // This might be updated later using ++ // $ set debug-file-directory /to/some/path ++ // which will use xfree. We must then have a xmallocated ++ // copy of the string that can be xfeed later. ++ debug_file_directory = xstrdup (debug_file_directory); + else -+ debug_file_directory = relocate_gdb_directory (DEBUGDIR, - DEBUGDIR_RELOCATABLE); ++ debug_file_directory ++ = xstrdup (relocate_gdb_directory (DEBUGDIR, ++ DEBUGDIR_RELOCATABLE).c_str ()); + + gdb_datadir = relocate_gdb_directory (GDB_DATADIR, + GDB_DATADIR_RELOCATABLE); diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix index e125b7418f6b..baaba6245701 100644 --- a/pkgs/development/tools/misc/gdb/default.nix +++ b/pkgs/development/tools/misc/gdb/default.nix @@ -18,7 +18,7 @@ let basename = "gdb-${version}"; - version = "8.3.1"; + version = "9.1"; in assert pythonSupport -> python3 != null; @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnu/gdb/${basename}.tar.xz"; - sha256 = "1i2pjwaafrlz7wqm40b4znr77ai32rjsxkpl2az38yyarpbv8m8y"; + sha256 = "0dqp1p7w836iwijg1zb4a784n0j4pyjiw5v6h8fg5lpx6b40x7k9"; }; postPatch = if stdenv.isDarwin then '' @@ -65,6 +65,13 @@ stdenv.mkDerivation rec { # TODO(@Ericson2314): Always pass "--target" and always prefix. configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (stdenv.targetPlatform != stdenv.hostPlatform) "target"; + # GDB have to be built out of tree. + preConfigure = '' + mkdir _build + cd _build + ''; + configureScript = "../configure"; + configureFlags = with stdenv.lib; [ "--enable-targets=all" "--enable-64-bit-bfd" "--disable-install-libbfd" @@ -100,6 +107,6 @@ stdenv.mkDerivation rec { license = stdenv.lib.licenses.gpl3Plus; platforms = with platforms; linux ++ cygwin ++ darwin; - maintainers = with maintainers; [ pierron globin ]; + maintainers = with maintainers; [ pierron globin lsix ]; }; } |