[packages/gccxml] - added gcc patch (fixes build with gcc 5) - release .2

qboosh qboosh at pld-linux.org
Sat Oct 24 09:50:32 CEST 2015


commit 49c304e5739f2ac87107f056149577c812f0e14f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Oct 24 09:51:47 2015 +0200

    - added gcc patch (fixes build with gcc 5)
    - release .2

 gccxml-gcc.patch | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 gccxml.spec      |  5 ++++-
 2 files changed, 50 insertions(+), 1 deletion(-)
---
diff --git a/gccxml.spec b/gccxml.spec
index 549a78a..bc00422 100644
--- a/gccxml.spec
+++ b/gccxml.spec
@@ -4,11 +4,13 @@ Name:		gccxml
 Version:	0.9.0
 %define	gitref	3afa8ba5be6866e603dcabe80aff79856b558e24
 %define	snap	20150424
-Release:	0.%{snap}.1
+%define	rel	2
+Release:	0.%{snap}.%{rel}
 License:	GPL v2+ (GCC code), BSD-like (GCC-XML)
 Group:		Development/Tools
 Source0:	https://github.com/gccxml/gccxml/archive/%{gitref}/%{name}-%{snap}.tar.gz
 # Source0-md5:	70e4b145feb2a7036c835cf214cae26a
+Patch0:		%{name}-gcc.patch
 URL:		http://gccxml.github.io/HTML/Index.html
 BuildRequires:	cmake
 BuildRequires:	libstdc++-devel
@@ -25,6 +27,7 @@ użyciu rozszerzenia kompulatora C++ GCC.
 
 %prep
 %setup -q -n %{name}-%{gitref}
+%patch0 -p1
 
 %build
 install -d build
diff --git a/gccxml-gcc.patch b/gccxml-gcc.patch
new file mode 100644
index 0000000..e7066c6
--- /dev/null
+++ b/gccxml-gcc.patch
@@ -0,0 +1,46 @@
+--- gccxml-3afa8ba5be6866e603dcabe80aff79856b558e24/GCC/gcc/toplev.c.orig	2015-04-23 20:34:31.000000000 +0200
++++ gccxml-3afa8ba5be6866e603dcabe80aff79856b558e24/GCC/gcc/toplev.c	2015-10-24 09:12:05.031923748 +0200
+@@ -537,7 +537,7 @@
+    for floor_log2 and exact_log2; see toplev.h.  That construct, however,
+    conflicts with the ISO C++ One Definition Rule.   */
+ 
+-#if GCC_VERSION < 3004 || !defined (__cplusplus)
++#if GCC_VERSION < 3004
+ 
+ /* Given X, an unsigned number, return the largest int Y such that 2**Y <= X.
+    If X is 0, return -1.  */
+--- gccxml-3afa8ba5be6866e603dcabe80aff79856b558e24/GCC/gcc/toplev.h.orig	2015-04-23 20:34:31.000000000 +0200
++++ gccxml-3afa8ba5be6866e603dcabe80aff79856b558e24/GCC/gcc/toplev.h	2015-10-24 09:05:58.959568201 +0200
+@@ -151,6 +151,7 @@
+ /* Return true iff flags are set as if -ffast-math.  */
+ extern bool fast_math_flags_set_p	(void);
+ 
++#if GCC_VERSION < 3004
+ /* Return log2, or -1 if not exact.  */
+ extern int exact_log2                  (unsigned HOST_WIDE_INT);
+ 
+@@ -158,7 +159,7 @@
+ extern int floor_log2                  (unsigned HOST_WIDE_INT);
+ 
+ /* Inline versions of the above for speed.  */
+-#if GCC_VERSION >= 3004
++#else /* GCC_VERSION >= 3004 */
+ # if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
+ #  define CLZ_HWI __builtin_clzl
+ #  define CTZ_HWI __builtin_ctzl
+@@ -170,13 +171,13 @@
+ #  define CTZ_HWI __builtin_ctz
+ # endif
+ 
+-extern inline int
++static inline int
+ floor_log2 (unsigned HOST_WIDE_INT x)
+ {
+   return x ? HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x) : -1;
+ }
+ 
+-extern inline int
++static inline int
+ exact_log2 (unsigned HOST_WIDE_INT x)
+ {
+   return x == (x & -x) && x ? (int) CTZ_HWI (x) : -1;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gccxml.git/commitdiff/49c304e5739f2ac87107f056149577c812f0e14f



More information about the pld-cvs-commit mailing list