[root/el5] Don't use new gcc options for old gcc versions

Mattias Ellert ellert at fedoraproject.org
Fri Jul 18 20:21:55 UTC 2014


commit 4abba64da95bc764407d96397731332298d27636
Author: Mattias Ellert <mattias.ellert at fysast.uu.se>
Date:   Fri Jul 18 22:21:35 2014 +0200

    Don't use new gcc options for old gcc versions

 root-gccopt.patch |   37 +++++++++++++++++++++++++++++++++++++
 root.spec         |    3 +++
 2 files changed, 40 insertions(+), 0 deletions(-)
---
diff --git a/root-gccopt.patch b/root-gccopt.patch
new file mode 100644
index 0000000..5fb3cb6
--- /dev/null
+++ b/root-gccopt.patch
@@ -0,0 +1,37 @@
+diff -ur root-5.34.19.orig/bindings/pyroot/Module.mk root-5.34.19/bindings/pyroot/Module.mk
+--- root-5.34.19.orig/bindings/pyroot/Module.mk	2014-07-09 16:50:16.000000000 +0200
++++ root-5.34.19/bindings/pyroot/Module.mk	2014-07-18 16:26:11.682503438 +0200
+@@ -123,14 +123,15 @@
+ $(PYTHON64O): CFLAGS += $(PYTHONINCDIR:%=-I%)
+ ifeq ($(GCC_MAJOR),4)
+ $(PYROOTO): CXXFLAGS += -fno-strict-aliasing
+-endif
+-ifneq ($(CLANG_MAJOR)$(GCC_MAJOR),)
+-# Building with clang or GCC
++ifeq ($(subst $(GCC_MINOR),,0 1),0 1)
++# GCC >= 4.2
+ $(PYROOTO) $(PYTHON64O) $(PYROOTDO): CXXFLAGS += -Wno-error=format
+ endif
++endif
+ 
+ ifneq ($(CLANG_MAJOR),)
+ # Building with clang 
+ $(PYROOTO) $(PYTHON64O) $(PYROOTDO): CXXFLAGS += -Wno-ignored-attributes
++$(PYROOTO) $(PYTHON64O) $(PYROOTDO): CXXFLAGS += -Wno-error=format
+ endif
+ 
+diff -ur root-5.34.19.orig/io/dcache/Module.mk root-5.34.19/io/dcache/Module.mk
+--- root-5.34.19.orig/io/dcache/Module.mk	2014-07-09 16:50:16.000000000 +0200
++++ root-5.34.19/io/dcache/Module.mk	2014-07-18 14:41:34.700841953 +0200
+@@ -68,7 +68,10 @@
+ 
+ ##### extra rules ######
+ $(DCACHEO) $(DCACHEDO): CXXFLAGS := $(filter-out -Wall,$(CXXFLAGS)) $(DCAPINCDIR:%=-I%)
+-ifneq ($(CXX:g++=),$(CXX))
++ifeq ($(GCC_MAJOR),4)
++ifeq ($(subst $(GCC_MINOR),,0 1 2),0 1 2)
++# GCC >= 4.3
+    $(DCACHEO) $(DCACHEDO):  CXXFLAGS += -Wno-ignored-qualifiers
+ endif
++endif
+ 
diff --git a/root.spec b/root.spec
index 15669a3..69dc5bb 100644
--- a/root.spec
+++ b/root.spec
@@ -83,6 +83,8 @@ Patch7:		%{name}-hdfs.patch
 Patch8:		%{name}-dont-link-jvm.patch
 #		Avoid deprecated __USE_BSD
 Patch9:		%{name}-bsd-misc.patch
+#		Don't use new gcc options for old gcc versions
+Patch10:	%{name}-gccopt.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 #		The build segfaults on ppc64 during an invocation of cint:
 #		https://savannah.cern.ch/bugs/index.php?70542
@@ -1191,6 +1193,7 @@ fi
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
+%patch10 -p1
 
 find . '(' -name '*.cxx' -o -name '*.cpp' -o -name '*.C' -o -name '*.c' -o \
 	   -name '*.h' -o -name '*.hh' -o -name '*.hi' -o -name '*.py' -o \


More information about the scm-commits mailing list