!41 gdb: 提取上游补丁修复编译失败问题
Merge pull request !41 from Chenxi Mao/openEuler-22.03-LTS-Next
This commit is contained in:
commit
ee7b48643c
44
0001-Make-c-exp.y-work-with-Bison-3.8.patch
Normal file
44
0001-Make-c-exp.y-work-with-Bison-3.8.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From cb9f257adb210ad1f1e9abea1b8e8675a96077df Mon Sep 17 00:00:00 2001
|
||||
From: Christian Biesinger <cbiesinger@google.com>
|
||||
Date: Fri, 8 Oct 2021 16:09:46 -0400
|
||||
Subject: [PATCH 1/1] Make c-exp.y work with Bison 3.8+
|
||||
|
||||
When using Bison 3.8, we get this error:
|
||||
|
||||
../../gdb/c-exp.y:3455:1: error: 'void c_print_token(FILE*, int, YYSTYPE)' defined but not used [-Werror=unused-function]
|
||||
|
||||
That's because bison 3.8 removed YYPRINT support:
|
||||
https://savannah.gnu.org/forum/forum.php?forum_id=10047
|
||||
|
||||
Accordingly, this patch only defines that function for Bison < 3.8.
|
||||
|
||||
Change-Id: I3cbf2f317630bb72810b00f2d9b2c4b99fa812ad
|
||||
---
|
||||
gdb/c-exp.y | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
|
||||
index 3403a85..d17f104 100644
|
||||
--- a/gdb/c-exp.y
|
||||
+++ b/gdb/c-exp.y
|
||||
@@ -166,7 +166,7 @@ static void check_parameter_typelist (std::vector<struct type *> *);
|
||||
static void write_destructor_name (struct parser_state *par_state,
|
||||
struct stoken);
|
||||
|
||||
-#ifdef YYBISON
|
||||
+#if defined(YYBISON) && YYBISON < 30800
|
||||
static void c_print_token (FILE *file, int type, YYSTYPE value);
|
||||
#define YYPRINT(FILE, TYPE, VALUE) c_print_token (FILE, TYPE, VALUE)
|
||||
#endif
|
||||
@@ -3311,7 +3311,7 @@ c_parse (struct parser_state *par_state)
|
||||
return yyparse ();
|
||||
}
|
||||
|
||||
-#ifdef YYBISON
|
||||
+#if defined(YYBISON) && YYBISON < 30800
|
||||
|
||||
/* This is called via the YYPRINT macro when parser debugging is
|
||||
enabled. It prints a token's value. */
|
||||
--
|
||||
2.32.0
|
||||
|
||||
6
gdb.spec
6
gdb.spec
@ -1,6 +1,6 @@
|
||||
Name: gdb
|
||||
Version: 9.2
|
||||
Release: 7
|
||||
Release: 8
|
||||
|
||||
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL-1.3
|
||||
Source: ftp://sourceware.org/pub/gdb/releases/gdb-%{version}.tar.xz
|
||||
@ -114,6 +114,7 @@ Patch101: gdb-rhbz1838777-debuginfod.patch
|
||||
# Fedora patch end
|
||||
|
||||
Patch102: 0001-adjust-include-order-to-avoid-gnulib-error.patch
|
||||
Patch103: 0001-Make-c-exp.y-work-with-Bison-3.8.patch
|
||||
|
||||
%global gdb_src gdb-%{version}
|
||||
%global gdb_build build-%{_target_platform}
|
||||
@ -396,6 +397,9 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/gdb/python/gdb/command/backtrace.py
|
||||
%{_infodir}/gdb.info*
|
||||
|
||||
%changelog
|
||||
* Tue Dec 21 2021 - Chenxi Mao <chenxi.mao@suse.com> - 9.2-8
|
||||
- fix gdb build error via cherry-pick upstream patch
|
||||
|
||||
* Fri Aug 13 2021 zhouwenpei <zhouwenpei1@huawei.com> - 9.2-7
|
||||
- adjust include order to avoid gnulib error
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user