[rhel6+7] Fix compatibility of bison <3.1 and gcc >=6.

This commit is contained in:
Jan Kratochvil 2016-09-07 13:45:40 +02:00
parent 0414aeba5a
commit 35cbc92246
2 changed files with 52 additions and 1 deletions

44
gdb-bison-old.patch Normal file
View File

@ -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_NULL\>/YY_NULLPTR/g' \
< $@.tmp > $@
rm -f $@.tmp
.l.c:

View File

@ -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 <jan.kratochvil@redhat.com> - 7.12-0.12.20160904.fc25
- [rhel6+7] Fix compatibility of bison <3.1 and gcc >=6.
* Sun Sep 4 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.12-0.11.20160904.fc25
- Release bump for a mistaken build.