Merge pull request #217884 from trofi/gdb-update

gdb: 12.1 -> 13.1
This commit is contained in:
Sergei Trofimovich 2023-02-28 20:38:24 +00:00 committed by GitHub
commit 10f10a3d6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@
, fetchurl, fetchpatch, pkg-config, perl, texinfo, setupDebugInfoDirs, buildPackages
# Run time
, ncurses, readline, gmp, mpfr, expat, libipt, zlib, dejagnu, sourceHighlight
, ncurses, readline, gmp, mpfr, expat, libipt, zlib, zstd, dejagnu, sourceHighlight
, pythonSupport ? stdenv.hostPlatform == stdenv.buildPlatform && !stdenv.hostPlatform.isCygwin, python3 ? null
, enableDebuginfod ? false, elfutils
@ -28,11 +28,11 @@ assert pythonSupport -> python3 != null;
stdenv.mkDerivation rec {
pname = targetPrefix + basename;
version = "12.1";
version = "13.1";
src = fetchurl {
url = "mirror://gnu/gdb/${basename}-${version}.tar.xz";
hash = "sha256-DheTv48rVNU/Rt6oTM/URvSPgbKXsoxPf8AXuBjWn+0=";
hash = "sha256-EVrVwY1ppr4qsViC02XdoqIhHBT0gLNQLG66V24ulaA=";
};
postPatch = lib.optionalString stdenv.isDarwin ''
@ -47,23 +47,13 @@ stdenv.mkDerivation rec {
patches = [
./debug-info-from-env.patch
# backport readline=8.2 support
(fetchpatch {
name = "readline-8.2.patch";
url = "https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=1add37b567a7dee39d99f37b37802034c3fce9c4";
hash = "sha256-KmQXylPAWNGXF8wtXCCArhUzHi+GUY8ii2Xpx8R08jE=";
})
] ++ lib.optionals stdenv.isDarwin [
./darwin-target-match.patch
# Does not nave to be conditional. We apply it conditionally
# to speed up inclusion to nearby nixos release.
] ++ lib.optionals stdenv.is32bit [
./32-bit-BFD_VMA-format.patch
];
nativeBuildInputs = [ pkg-config texinfo perl setupDebugInfoDirs ];
buildInputs = [ ncurses readline gmp mpfr expat libipt zlib guile sourceHighlight ]
buildInputs = [ ncurses readline gmp mpfr expat libipt zlib zstd guile sourceHighlight ]
++ lib.optional pythonSupport python3
++ lib.optional doCheck dejagnu
++ lib.optional enableDebuginfod (elfutils.override { enableDebuginfod = true; });