diff --git a/tbb-4.1-dont-snip-Wall.patch b/tbb-4.1-dont-snip-Wall.patch new file mode 100644 index 0000000..400215c --- /dev/null +++ b/tbb-4.1-dont-snip-Wall.patch @@ -0,0 +1,14 @@ +diff -up tbb41_20130314oss/build/Makefile.tbbmalloc\~ tbb41_20130314oss/build/Makefile.tbbmalloc +--- tbb41_20130314oss/build/Makefile.tbbmalloc~ 2013-12-03 11:58:27.304411388 +0100 ++++ tbb41_20130314oss/build/Makefile.tbbmalloc 2013-12-03 11:59:03.568650698 +0100 +@@ -51,7 +51,7 @@ include $(tbb_root)/build/common_rules.i + MALLOC_CPLUS.OBJ = backend.$(OBJ) large_objects.$(OBJ) backref.$(OBJ) tbbmalloc.$(OBJ) + MALLOC.OBJ := $(MALLOC_CPLUS.OBJ) $(MALLOC_ASM.OBJ) itt_notify_malloc.$(OBJ) frontend.$(OBJ) + PROXY.OBJ := proxy.$(OBJ) tbb_function_replacement.$(OBJ) +-M_CPLUS_FLAGS := $(subst $(WARNING_KEY),,$(M_CPLUS_FLAGS)) $(DEFINE_KEY)__TBBMALLOC_BUILD=1 ++M_CPLUS_FLAGS := -fno-strict-aliasing $(M_CPLUS_FLAGS) $(DEFINE_KEY)__TBBMALLOC_BUILD=1 + M_INCLUDES = $(INCLUDES) $(INCLUDE_KEY)$(MALLOC_ROOT) $(INCLUDE_KEY)$(MALLOC_SOURCE_ROOT) + + # Suppress superfluous warnings for TBBmalloc compilation + +Diff finished. Tue Dec 3 11:59:07 2013 diff --git a/tbb.spec b/tbb.spec index 4007b9d..f4922ca 100644 --- a/tbb.spec +++ b/tbb.spec @@ -10,7 +10,7 @@ Summary: The Threading Building Blocks library abstracts low-level threading details Name: tbb Version: %{dotver} -Release: 4.%{releasedate}%{?dist} +Release: 5.%{releasedate}%{?dist} License: GPLv2 with exceptions Group: Development/Tools URL: http://threadingbuildingblocks.org/ @@ -30,6 +30,11 @@ Patch1: tbb-3.0-cxxflags.patch # which we still don't assume. Patch2: tbb-4.0-mfence.patch +# Don't snip -Wall from C++ flags. Add -fno-strict-aliasing, as that +# uncovers some static-aliasing warnings. +# Related: https://bugzilla.redhat.com/show_bug.cgi?id=1037347 +Patch3: tbb-4.1-dont-snip-Wall.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libstdc++-devel ExclusiveArch: %{ix86} x86_64 ia64 ppc ppc64 %{arm} @@ -69,6 +74,7 @@ C++ library. %setup -q -n %{sourcebasename} %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS" tbb_build_prefix=obj @@ -125,6 +131,9 @@ rm -rf ${RPM_BUILD_ROOT} %doc doc/html %changelog +* Tue Dec 3 2013 Petr Machata - 4.1-5.20130314 +- Fix building with -Werror=format-security (tbb-4.1-dont-snip-Wall.patch) + * Thu Oct 3 2013 Petr Machata - 4.1-4.20130314 - Fix %%install to also install include files that are not named *.h