From 35cbc922469f0cbdddbc3c9a3790f62cd636501c Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Wed, 7 Sep 2016 13:45:40 +0200 Subject: [PATCH] [rhel6+7] Fix compatibility of bison <3.1 and gcc >=6. --- gdb-bison-old.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++ gdb.spec | 9 ++++++++- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 gdb-bison-old.patch diff --git a/gdb-bison-old.patch b/gdb-bison-old.patch new file mode 100644 index 0000000..4fc021d --- /dev/null +++ b/gdb-bison-old.patch @@ -0,0 +1,44 @@ +bison-3.0.4-4.fc24.x86_64 +vs. +bison-2.7-4.el7.x86_64 + +bison: +8d0b7cef7df7fead44b9574cee342de336008625 tags/v3.0.1~2 + parsers: rename YY_NULL as YY_NULLPTR to avoid conflicts with Flex + +ada-lex.c:113:0: error: "YY_NULL" redefined [-Werror] + #define YY_NULL 0 + +ada-exp.c:158:0: note: this is the location of the previous definition + # define YY_NULL nullptr + +*-exp.c cp-name-parser.c +vs. +ada-lex.c + +# ifndef YY_NULL +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULL nullptr +# else +# define YY_NULL 0 +# endif +# endif + +# ifndef YY_NULLPTR +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# endif + +--- gdb-clean712/gdb/Makefile.in 2016-08-29 09:16:15.505393928 +0200 ++++ gdb-clean712/gdb/Makefile.in 2016-09-07 13:32:34.744270346 +0200 +@@ -1900,6 +1945,7 @@ po/$(PACKAGE).pot: force + -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \ + -e 's/\([ \t;,(]\)free$$/\1xfree/g' \ + -e '/^#line.*y.tab.c/d' \ ++ -e 's/\/YY_NULLPTR/g' \ + < $@.tmp > $@ + rm -f $@.tmp + .l.c: diff --git a/gdb.spec b/gdb.spec index 7cdb66c..9971cab 100644 --- a/gdb.spec +++ b/gdb.spec @@ -28,7 +28,7 @@ Version: 7.12 # The release always contains a leading reserved number, start it at 1. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. -Release: 0.11.%{tardate}%{?dist} +Release: 0.12.%{tardate}%{?dist} License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL Group: Development/Debuggers @@ -582,6 +582,9 @@ Patch1123: gdb-rhbz1325795-framefilters-test.patch # [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513). Patch1143: gdb-linux_perf-bundle.patch +# [rhel6+7] Fix compatibility of bison <3.1 and gcc >=6. +Patch1144: gdb-bison-old.patch + %if 0%{!?rhel:1} || 0%{?rhel} > 6 # RL_STATE_FEDORA_GDB would not be found for: # Patch642: gdb-readline62-ask-more-rh.patch @@ -918,6 +921,7 @@ done %patch1120 -p1 %patch1123 -p1 %patch1143 -p1 +%patch1144 -p1 %patch1075 -p1 %if 0%{?rhel:1} && 0%{?rhel} <= 7 @@ -1464,6 +1468,9 @@ then fi %changelog +* Wed Sep 7 2016 Jan Kratochvil - 7.12-0.12.20160904.fc25 +- [rhel6+7] Fix compatibility of bison <3.1 and gcc >=6. + * Sun Sep 4 2016 Jan Kratochvil - 7.12-0.11.20160904.fc25 - Release bump for a mistaken build.