gdb: pull upstream fix for gcc-12

Without the change the build fails as:

    sim/cr16/interp.c: In function 'lookup_hash':
    sim/cr16/interp.c:89:25: error:
      the comparison will always evaluate as 'true'
      for the address of 'mnimonic' will never be NULL [-Werror=address]
       89 |   if ((h->ops->mnimonic != NULL) &&
          |                         ^~
main
Sergei Trofimovich 3 years ago
parent 02cea625b0
commit 53e928ed5f
  1. 9
      pkgs/development/tools/misc/gdb/default.nix

@ -1,7 +1,7 @@
{ lib, stdenv, targetPackages
# Build time
, fetchurl, pkg-config, perl, texinfo, setupDebugInfoDirs, buildPackages
, fetchurl, fetchpatch, pkg-config, perl, texinfo, setupDebugInfoDirs, buildPackages
# Run time
, ncurses, readline, gmp, mpfr, expat, libipt, zlib, dejagnu, sourceHighlight
@ -41,6 +41,13 @@ stdenv.mkDerivation rec {
patches = [
./debug-info-from-env.patch
# Pull upstream fix for gcc-12. Will be included in gdb-12.
(fetchpatch {
name = "gcc-12.patch";
url = "https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=e97436b1b789dcdb6ffb502263f4c86f8bc22996";
sha256 = "1mpgw6s9qgnwhwyg3hagc6vhqhvia0l1s8nr22bcahwqxi3wvzcw";
})
] ++ lib.optionals stdenv.isDarwin [
./darwin-target-match.patch
];

Loading…
Cancel
Save