From 6916ff5c53e51977dc3ecc84c6f6bd2d2d7fb6cad1304b455a7b3acbe296014a Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Mon, 2 Jan 2017 09:30:23 +0000 Subject: [PATCH] Accepting request 448458 from home:marxin:branches:devel:tools:compiler gcc7-fix.patch: Add forward declaration to compile with GCC7. OBS-URL: https://build.opensuse.org/request/show/448458 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/bison?expand=0&rev=48 --- bison.changes | 5 +++++ bison.spec | 5 ++++- gcc7-fix.patch | 13 +++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 gcc7-fix.patch diff --git a/bison.changes b/bison.changes index b163b05..53b3904 100644 --- a/bison.changes +++ b/bison.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Dec 16 09:45:23 UTC 2016 - mliska@suse.cz + +- gcc7-fix.patch: Add forward declaration to compile with GCC7. + ------------------------------------------------------------------- Wed Dec 14 11:04:29 UTC 2016 - tchvatal@suse.com diff --git a/bison.spec b/bison.spec index c16b16a..8014d15 100644 --- a/bison.spec +++ b/bison.spec @@ -1,7 +1,7 @@ # # spec file for package bison # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,6 +27,8 @@ Source0: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz Source1: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig Source2: %{name}.keyring Source3: baselibs.conf +Patch1: gcc7-fix.patch +BuildRequires: autoconf BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: xz @@ -43,6 +45,7 @@ Bison is a parser generator similar to yacc(1). %prep %setup -q +%patch1 %build %configure --disable-silent-rules \ diff --git a/gcc7-fix.patch b/gcc7-fix.patch new file mode 100644 index 0000000..a7e3163 --- /dev/null +++ b/gcc7-fix.patch @@ -0,0 +1,13 @@ +--- /home/marxin/Programming/bison-3.0.4/tests/c++.at 2015-01-20 20:39:51.000000000 +0100 ++++ tests/c++.at 2016-12-14 10:58:00.046437207 +0100 +@@ -197,6 +197,10 @@ + #include + #include + typedef std::list strings_type; ++namespace std ++{ ++ std::ostream& operator<<(std::ostream& o, const strings_type& s); ++} + } + + %code // code for the .cc file