Don't snip -Wall from build flags

This commit is contained in:
Petr Machata 2013-12-03 12:21:02 +01:00
parent 97f14cca17
commit d5c7dbcb32
2 changed files with 24 additions and 1 deletions

View File

@ -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

View File

@ -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 <pmachata@redhat.com> - 4.1-5.20130314
- Fix building with -Werror=format-security (tbb-4.1-dont-snip-Wall.patch)
* Thu Oct 3 2013 Petr Machata <pmachata@redhat.com> - 4.1-4.20130314
- Fix %%install to also install include files that are not named *.h