From: Jakub Bogusz Date: Thu, 28 Mar 2019 20:53:19 +0000 (+0100) Subject: - updated to 0.4.0 X-Git-Tag: auto/th/glog-0.4.0-1 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fglog.git;a=commitdiff_plain;h=97ed79bd2dbffd275ef5ab748ac8fccd22e7bd79 - updated to 0.4.0 - updated avoid-inline-asm patch - removed obsolete gcc5 patch --- diff --git a/avoid-inline-asm.patch b/avoid-inline-asm.patch index b6fa9cd..7387466 100644 --- a/avoid-inline-asm.patch +++ b/avoid-inline-asm.patch @@ -2,9 +2,9 @@ http://code.google.com/p/google-glog/issues/detail?id=130 make the code work with all gcc targets ---- a/src/symbolize_unittest.cc -+++ b/src/symbolize_unittest.cc -@@ -60,9 +60,7 @@ using namespace GOOGLE_NAMESPACE; +--- glog-0.4.0/src/symbolize_unittest.cc.orig 2019-03-22 03:51:46.000000000 +0100 ++++ glog-0.4.0/src/symbolize_unittest.cc 2019-03-28 20:39:09.755256776 +0100 +@@ -77,9 +77,7 @@ # endif // __i386__ # else # endif // __GNUC__ >= 4 @@ -14,11 +14,11 @@ make the code work with all gcc targets +# define TEST_WITH_LABEL_ADDRESSES #endif - // A wrapper function for Symbolize() to make the unit test simple. -@@ -289,22 +287,24 @@ TEST(Symbolize, SymbolizeWithDemanglingStackConsumption) { + // Make them C linkage to avoid mangled names. +@@ -312,8 +310,9 @@ extern "C" { inline void* always_inline inline_func() { - register void *pc = NULL; + void *pc = NULL; -#ifdef TEST_X86_32_AND_64 - __asm__ __volatile__("call 1f; 1: pop %0" : "=r"(pc)); +#ifdef TEST_WITH_LABEL_ADDRESSES @@ -27,9 +27,10 @@ make the code work with all gcc targets #endif return pc; } - +@@ -321,14 +320,15 @@ + void* ATTRIBUTE_NOINLINE non_inline_func(); void* ATTRIBUTE_NOINLINE non_inline_func() { - register void *pc = NULL; + void *pc = NULL; -#ifdef TEST_X86_32_AND_64 - __asm__ __volatile__("call 1f; 1: pop %0" : "=r"(pc)); +#ifdef TEST_WITH_LABEL_ADDRESSES @@ -39,16 +40,16 @@ make the code work with all gcc targets return pc; } - void ATTRIBUTE_NOINLINE TestWithPCInsideNonInlineFunction() { + static void ATTRIBUTE_NOINLINE TestWithPCInsideNonInlineFunction() { -#if defined(TEST_X86_32_AND_64) && defined(HAVE_ATTRIBUTE_NOINLINE) +#if defined(TEST_WITH_LABEL_ADDRESSES) && defined(HAVE_ATTRIBUTE_NOINLINE) void *pc = non_inline_func(); const char *symbol = TrySymbolize(pc); CHECK(symbol != NULL); -@@ -314,7 +314,7 @@ void ATTRIBUTE_NOINLINE TestWithPCInsideNonInlineFunction() { +@@ -338,7 +338,7 @@ } - void ATTRIBUTE_NOINLINE TestWithPCInsideInlineFunction() { + static void ATTRIBUTE_NOINLINE TestWithPCInsideInlineFunction() { -#if defined(TEST_X86_32_AND_64) && defined(HAVE_ALWAYS_INLINE) +#if defined(TEST_WITH_LABEL_ADDRESSES) && defined(HAVE_ALWAYS_INLINE) void *pc = inline_func(); // Must be inlined. diff --git a/gcc5.patch b/gcc5.patch deleted file mode 100644 index fd1518c..0000000 --- a/gcc5.patch +++ /dev/null @@ -1,56 +0,0 @@ -From b1639e3014996fbc7635870e013559c54e7e3b2f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?David=20Mart=C3=ADnez=20Moreno?= -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; - } - -+// ::= B -+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; -+} -+ - // ::= - // ::= - // ::= diff --git a/glog.spec b/glog.spec index abdb198..11f73b5 100644 --- a/glog.spec +++ b/glog.spec @@ -5,16 +5,15 @@ Summary: A C++ application logging library Summary(pl.UTF-8): Biblioteka do logowania dla aplikacji w C++ Name: glog -Version: 0.3.5 -Release: 3 +Version: 0.4.0 +Release: 1 License: BSD Group: Libraries #Source0Download: https://github.com/google/glog/releases Source0: https://github.com/google/glog/archive/v%{version}/%{name}-%{version}.tar.gz -# Source0-md5: 5df6d78b81e51b90ac0ecd7ed932b0d4 +# Source0-md5: 0daea8785e6df922d7887755c3d100d0 Patch0: %{name}-gflags.patch Patch1: avoid-inline-asm.patch -Patch2: gcc5.patch URL: https://github.com/google/glog BuildRequires: autoconf >= 2.57 BuildRequires: automake @@ -29,7 +28,7 @@ BuildRequires: gtest-devel BuildConflicts: gmock-devel BuildConflicts: gtest-devel %endif -%ifarch %{ix86} %{x8664} arm hppa ia64 mips ppc ppc64 sh +%ifarch %{ix86} %{x8664} x32 %{arm} hppa ia64 mips ppc ppc64 sh BuildRequires: libunwind-devel %endif BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -76,7 +75,6 @@ Statyczna biblioteka glog. %setup -q %patch0 -p1 %patch1 -p1 -%patch2 -p1 %build %if %{with tests} @@ -117,7 +115,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) -%doc AUTHORS COPYING ChangeLog README +%doc AUTHORS COPYING ChangeLog README.md %attr(755,root,root) %{_libdir}/libglog.so.*.*.* %attr(755,root,root) %ghost %{_libdir}/libglog.so.0