toolchain/binutils: backport stable patches
[openwrt/staging/hauke.git] / toolchain / binutils / patches / 2.40 / 005-libctf-update-regexp-to-allow-makeinfo-to-build-docu.patch
1 From f7c5db99b76e8dde89335d794c82fcbfbf53c612 Mon Sep 17 00:00:00 2001
2 From: Enze Li <enze.li@hotmail.com>
3 Date: Sat, 14 Jan 2023 11:33:48 +0800
4 Subject: [PATCH 05/50] libctf: update regexp to allow makeinfo to build
5 document
6
7 While trying to build gdb on latest openSUSE Tumbleweed, I noticed the
8 following warning,
9
10 checking for makeinfo... makeinfo --split-size=5000000
11 configure: WARNING:
12 *** Makeinfo is too old. Info documentation will not be built.
13
14 then I checked the version of makeinfo, it said,
15 ======
16 $ makeinfo --version
17 texi2any (GNU texinfo) 7.0.1
18
19 Copyright (C) 2022 Free Software Foundation, Inc.
20 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
21 This is free software: you are free to change and redistribute it.
22 There is NO WARRANTY, to the extent permitted by law.
23 ======
24
25 After digging a little bit, it became quite obvious that a dot is
26 missing in regexp that makes it impossible to match versions higher than
27 7.0, and here's the solution:
28
29 - | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
30 + | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]\.[0-9])' >/dev/null 2>&1; then
31
32 However, Eli pointed out that the solution above has another problem: it
33 will stop working when Texinfo 10.1 will be released. Meanwhile, he
34 suggested to solve this problem permanently. That is, we don't care
35 about the minor version for Texinfo > 6.9, we only care about the major
36 version.
37
38 In this way, the problem will be resolved permanently, thanks to Eli.
39
40 libctf/ChangeLog:
41
42 * configure: Regenerated.
43 * configure.ac: Update regexp to match versions higher than 7.0.
44 ---
45 libctf/configure | 2 +-
46 libctf/configure.ac | 2 +-
47 2 files changed, 2 insertions(+), 2 deletions(-)
48
49 --- a/libctf/configure
50 +++ b/libctf/configure
51 @@ -14865,7 +14865,7 @@ esac
52 # We require texinfo to be 6.3 or later, for a working synindex
53 # and validatemenus: otherwise we fall back to /bin/true.
54 if ${MAKEINFO} --version \
55 - | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
56 + | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]|[1-6][0-9])' >/dev/null 2>&1; then
57 build_info=yes
58 else
59 build_info=
60 --- a/libctf/configure.ac
61 +++ b/libctf/configure.ac
62 @@ -184,7 +184,7 @@ changequote(,)
63 # We require texinfo to be 6.3 or later, for a working synindex
64 # and validatemenus: otherwise we fall back to /bin/true.
65 if ${MAKEINFO} --version \
66 - | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
67 + | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]|[1-6][0-9])' >/dev/null 2>&1; then
68 build_info=yes
69 else
70 build_info=