[packages/glog] - add fix for gcc5 - rel 3
baggins
baggins at pld-linux.org
Sun Nov 22 01:33:38 CET 2015
commit 50961da60199f9520efa8a22adc89de5bfe9e3a5
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Nov 22 01:33:25 2015 +0100
- add fix for gcc5
- rel 3
gcc5.patch | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
glog.spec | 4 +++-
2 files changed, 59 insertions(+), 1 deletion(-)
---
diff --git a/glog.spec b/glog.spec
index 61dafbf..69139f9 100644
--- a/glog.spec
+++ b/glog.spec
@@ -6,13 +6,14 @@ Summary: A C++ application logging library
Summary(pl.UTF-8): Biblioteka do logowania dla aplikacji w C++
Name: glog
Version: 0.3.4
-Release: 2
+Release: 3
License: BSD
Group: Libraries
Source0: https://github.com/google/glog/archive/v%{version}/%{name}-%{version}.tar.gz
# Source0-md5: df92e05c9d02504fb96674bc776a41cb
Patch0: %{name}-gflags.patch
Patch1: avoid-inline-asm.patch
+Patch2: gcc5.patch
URL: https://github.com/google/glog
BuildRequires: autoconf >= 2.57
BuildRequires: automake
@@ -71,6 +72,7 @@ Statyczna biblioteka glog.
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%build
%if %{with tests}
diff --git a/gcc5.patch b/gcc5.patch
new file mode 100644
index 0000000..fd1518c
--- /dev/null
+++ b/gcc5.patch
@@ -0,0 +1,56 @@
+From b1639e3014996fbc7635870e013559c54e7e3b2f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?David=20Mart=C3=ADnez=20Moreno?= <ender at debian.org>
+Date: Thu, 13 Aug 2015 09:31:26 -0700
+Subject: [PATCH] Fix ABI demangling for the GCC 5.x case.
+
+When glog is compiled with gcc-5.2 in cxx11 ABI mode, it barfs about unmangled symbols. This patches it getting inspiration from binutils and demangle.cc itself, although it may be totally wrong or maybe have to use ParseAbiTag in more places. I haven't read the spec for the symbols, though.
+
+This patch makes the demangle unit test pass correctly.
+---
+ src/demangle.cc | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/src/demangle.cc b/src/demangle.cc
+index e858181..0f0c831 100644
+--- a/src/demangle.cc
++++ b/src/demangle.cc
+@@ -439,6 +439,7 @@ static bool ParseExprPrimary(State *state);
+ static bool ParseLocalName(State *state);
+ static bool ParseDiscriminator(State *state);
+ static bool ParseSubstitution(State *state);
++static bool ParseAbiTag(State *state);
+
+ // Implementation note: the following code is a straightforward
+ // translation of the Itanium C++ ABI defined in BNF with a couple of
+@@ -567,6 +568,8 @@ static bool ParseNestedName(State *state) {
+ static bool ParsePrefix(State *state) {
+ bool has_something = false;
+ while (true) {
++ if (ParseAbiTag(state))
++ continue;
+ MaybeAppendSeparator(state);
+ if (ParseTemplateParam(state) ||
+ ParseSubstitution(state) ||
+@@ -585,6 +588,22 @@ static bool ParsePrefix(State *state) {
+ return true;
+ }
+
++// <abi-tag> ::= B <source-name>
++static bool ParseAbiTag(State *state) {
++ State copy = *state;
++
++ Append(state, "[", 1);
++ if (ParseOneCharToken(state, 'B') &&
++ ParseSourceName(state))
++ {
++ Append(state, "]", 1);
++ return true;
++ }
++
++ *state = copy;
++ return false;
++}
++
+ // <unqualified-name> ::= <operator-name>
+ // ::= <ctor-dtor-name>
+ // ::= <source-name>
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/glog.git/commitdiff/50961da60199f9520efa8a22adc89de5bfe9e3a5
More information about the pld-cvs-commit
mailing list