gdb: backport readline-8.2 fix

Without the change gdb fails build on `readline-8.2` as:

    ../../gdb/completer.c: In function 'char* gdb_completion_word_break_characters_throw()':
    ../../gdb/completer.c:2014:10: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
     2014 |   return rl_completer_word_break_characters;
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |          |
          |          const char*
This commit is contained in:
Sergei Trofimovich
2022-12-30 00:50:12 +00:00
parent a760f99e22
commit 3f5d99e914
+7 -1
View File
@@ -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
@@ -47,6 +47,12 @@ 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