[sparse] Add patch to fix build with GCC 4.6. (bz#716105)

Jeff Layton jlayton at fedoraproject.org
Thu Jun 23 19:40:59 UTC 2011


commit 09e899c8d956fb23cce0793b2976d12966f29c0d
Author: Jeff Layton <jlayton at redhat.com>
Date:   Thu Jun 23 15:40:15 2011 -0400

    Add patch to fix build with GCC 4.6. (bz#716105)

 0001-Fix-build-with-GCC-4.6-series.patch |   33 ++++++++++++++++++++++++++++++
 sparse.spec                              |    8 ++++++-
 2 files changed, 40 insertions(+), 1 deletions(-)
---
diff --git a/0001-Fix-build-with-GCC-4.6-series.patch b/0001-Fix-build-with-GCC-4.6-series.patch
new file mode 100644
index 0000000..e8914f2
--- /dev/null
+++ b/0001-Fix-build-with-GCC-4.6-series.patch
@@ -0,0 +1,33 @@
+From aaff080449ebcb66553ebf5b512f737b6191f339 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes at gmail.com>
+Date: Wed, 13 Apr 2011 13:06:06 +0200
+Subject: [PATCH] Fix build with GCC 4.6 series.
+
+The label_statement attribute in the anonymous structures' union was
+duplicated for label_arg and labeled_struct alises, which were
+identical. Since the former is never used, delete it and leave the other as
+the only copy.
+
+Signed-off-by: Christopher Li <sparse at chrisli.org>
+---
+ parse.h |    4 ----
+ 1 files changed, 0 insertions(+), 4 deletions(-)
+
+diff --git a/parse.h b/parse.h
+index 6b21e23..b26bd03 100644
+--- a/parse.h
++++ b/parse.h
+@@ -35,10 +35,6 @@ struct statement {
+ 		struct /* declaration */ {
+ 			struct symbol_list *declaration;
+ 		};
+-		struct /* label_arg */ {
+-			struct symbol *label;
+-			struct statement *label_statement;
+-		};
+ 		struct {
+ 			struct expression *expression;
+ 			struct expression *context;
+-- 
+1.7.5.4
+
diff --git a/sparse.spec b/sparse.spec
index 403769b..080c86b 100644
--- a/sparse.spec
+++ b/sparse.spec
@@ -1,6 +1,6 @@
 Name: sparse
 Version: 0.4.3
-Release: 2%{?dist}
+Release: 3%{?dist}
 Summary:    A semantic parser of source files
 Group:      Development/Tools
 License:    OSL 1.1
@@ -10,6 +10,8 @@ BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires: libxml2-devel
 
+Patch0:	0001-Fix-build-with-GCC-4.6-series.patch
+
 %description
 Sparse is a semantic parser of source files: it's neither a compiler
 (although it could be used as a front-end for one) nor is it a
@@ -37,6 +39,7 @@ Development headers headers and static lib for sparse-enabled apps
 
 %prep
 %setup -q
+%patch0 -p1
 
 %define make_destdir \
 make DESTDIR="%{buildroot}" PREFIX="%{_prefix}" \\\
@@ -82,6 +85,9 @@ make clean
 
 
 %changelog
+* Thu Jun 23 2011 Jeff Layton <jlayton at redhat.com> - 0.4.3-3
+- fix build with gcc 4.6 (bz#716105)
+
 * Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.4.3-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


More information about the scm-commits mailing list