Rebase to 2019 update 1.

Drop special SSE2 build for 32-bit x86 as that is now default.
Drop unneeded -cxxflags patch.
Drop python 2 support (bz 1629761).
This commit is contained in:
Jerry James 2018-10-13 11:04:02 -06:00
parent e074e8045c
commit a3e041fb5c
5 changed files with 56 additions and 173 deletions

View File

@ -1 +1 @@
SHA512 (2018_U5.tar.gz) = 3e8d20276ccb1b50099f96b6cf968e3d0ada53caea1fa836ecb8652f1dca236fbbbf2c783e64ea2f761f7f21725064d19b72d176e35e4dc29706b8a30965153b
SHA512 (tbb-2019_U1.tar.gz) = f3ea654ca6c691228dd97b5c0f55adf21def6938f2b2e50ef04b5a418a18b63e655348962a5d25ae615c66c55fe99eb631574dabf6970729bb3b7961c80df90e

View File

@ -1,7 +1,7 @@
diff -up tbb-2018_U5/build/common_rules.inc\~ tbb-2018_U5/build/common_rules.inc
--- tbb-2018_U5/build/common_rules.inc~ 2018-06-19 10:04:20.000000000 -0600
+++ tbb-2018_U5/build/common_rules.inc 2018-07-03 11:18:03.540252098 -0600
@@ -136,7 +136,7 @@ LINK_FILES+=$(TEST_LIBS)
diff -up tbb-2019_U1/build/common_rules.inc.orig tbb-2019_U1/build/common_rules.inc
--- tbb-2019_U1/build/common_rules.inc.orig 2018-10-04 03:38:29.000000000 -0600
+++ tbb-2019_U1/build/common_rules.inc 2018-10-05 09:12:02.123194170 -0600
@@ -130,7 +130,7 @@ LINK_FILES+=$(TEST_LIBS)
# Customizations
$(KNOWN_WARNINGS): %.$(OBJ): %.cpp
@ -10,21 +10,26 @@ diff -up tbb-2018_U5/build/common_rules.inc\~ tbb-2018_U5/build/common_rules.inc
tbb_misc.$(OBJ): version_string.ver
tbb_misc.$(OBJ): INCLUDES+=$(INCLUDE_KEY).
diff -up tbb-2018_U5/build/Makefile.tbbmalloc\~ tbb-2018_U5/build/Makefile.tbbmalloc
--- tbb-2018_U5/build/Makefile.tbbmalloc~ 2018-07-03 11:16:37.945377902 -0600
+++ tbb-2018_U5/build/Makefile.tbbmalloc 2018-07-03 11:16:58.872102659 -0600
@@ -51,7 +51,7 @@ ORIG_LINK_MALLOC.LIB:=$(LINK_MALLOC.LIB)
diff -up tbb-2019_U1/build/Makefile.tbbmalloc.orig tbb-2019_U1/build/Makefile.tbbmalloc
--- tbb-2019_U1/build/Makefile.tbbmalloc.orig 2018-10-04 03:38:29.000000000 -0600
+++ tbb-2019_U1/build/Makefile.tbbmalloc 2018-10-05 09:12:52.330321722 -0600
@@ -51,11 +51,11 @@ ORIG_LINK_MALLOC.LIB:=$(LINK_MALLOC.LIB)
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)) $(CXXFLAGS) $(DEFINE_KEY)__TBBMALLOC_BUILD=1
+M_CPLUS_FLAGS := $(CXXFLAGS) -fno-strict-aliasing $(DEFINE_KEY)__TBBMALLOC_BUILD=1
-M_CPLUS_FLAGS += $(DEFINE_KEY)__TBBMALLOC_BUILD=1
+M_CPLUS_FLAGS += -fno-strict-aliasing $(DEFINE_KEY)__TBBMALLOC_BUILD=1
M_INCLUDES := $(INCLUDES) $(INCLUDE_KEY)$(MALLOC_ROOT) $(INCLUDE_KEY)$(MALLOC_SOURCE_ROOT)
# Suppress superfluous warnings for TBBMalloc compilation
diff -dup tbb-2018_U5/build/Makefile.test\~ tbb-2018_U5/build/Makefile.test
--- tbb-2018_U5/build/Makefile.test~ 2018-06-19 10:04:20.000000000 -0600
+++ tbb-2018_U5/build/Makefile.test 2018-07-03 11:18:53.651592978 -0600
-$(MALLOC.OBJ): M_CPLUS_FLAGS := $(subst $(WARNING_KEY),,$(M_CPLUS_FLAGS)) $(WARNING_SUPPRESS)
+$(MALLOC.OBJ): M_CPLUS_FLAGS := $(M_CPLUS_FLAGS) $(WARNING_SUPPRESS)
# Suppress superfluous warnings for TBBMalloc proxy compilation
$(PROXY.OBJ): CPLUS_FLAGS += $(WARNING_SUPPRESS)
diff -up tbb-2019_U1/build/Makefile.test.orig tbb-2019_U1/build/Makefile.test
--- tbb-2019_U1/build/Makefile.test.orig 2018-10-04 03:38:29.000000000 -0600
+++ tbb-2019_U1/build/Makefile.test 2018-10-05 09:13:19.385851579 -0600
@@ -272,7 +272,7 @@ test_tbb_plain: $(TEST_PREREQUISITE) $(T
@ -35,4 +40,4 @@ diff -dup tbb-2018_U5/build/Makefile.test\~ tbb-2018_U5/build/Makefile.test
$(TEST_TBB_OLD.OBJ): CPLUS_FLAGS := $(CPLUS_FLAGS_DEPRECATED)
Diff finished. Tue Jul 3 11:19:32 2018
Diff finished. Fri Oct 5 09:13:20 2018

View File

@ -1,14 +0,0 @@
diff -up tbb44_20151115oss/include/tbb/machine/linux_ia32.h\~ tbb44_20151115oss/include/tbb/machine/linux_ia32.h
--- tbb44_20151115oss/include/tbb/machine/linux_ia32.h~ 2015-11-25 03:49:14.000000000 -0700
+++ tbb44_20151115oss/include/tbb/machine/linux_ia32.h 2016-01-14 20:29:45.251333321 -0700
@@ -34,7 +34,7 @@
#define __TBB_control_consistency_helper() __TBB_compiler_fence()
#define __TBB_acquire_consistency_helper() __TBB_compiler_fence()
#define __TBB_release_consistency_helper() __TBB_compiler_fence()
-#define __TBB_full_memory_fence() __asm__ __volatile__("mfence": : :"memory")
+#define __TBB_full_memory_fence() __sync_synchronize()
#if __TBB_ICC_ASM_VOLATILE_BROKEN
#define __TBB_VOLATILE
Diff finished. Thu Jan 14 20:30:12 2016

View File

@ -1,37 +0,0 @@
diff -up tbb-2018_U2/build/linux.gcc.inc\~ tbb-2018_U2/build/linux.gcc.inc
--- tbb-2018_U2/build/linux.gcc.inc~ 2017-12-06 10:29:49.000000000 -0700
+++ tbb-2018_U2/build/linux.gcc.inc 2018-01-22 20:47:07.148422967 -0700
@@ -68,10 +68,10 @@ ifneq (,$(shell gcc -dumpversion | egrep
endif
ifeq ($(cfg), release)
- CPLUS_FLAGS = $(ITT_NOTIFY) -g -O2 -DUSE_PTHREAD
+ CPLUS_FLAGS = $(CXXFLAGS) $(ITT_NOTIFY) -g -O2 -DUSE_PTHREAD
endif
ifeq ($(cfg), debug)
- CPLUS_FLAGS = -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD
+ CPLUS_FLAGS = $(CXXFLAGS) -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD
endif
TBB_ASM.OBJ=
diff -up tbb-2018_U2/build/Makefile.tbbmalloc\~ tbb-2018_U2/build/Makefile.tbbmalloc
--- tbb-2018_U2/build/Makefile.tbbmalloc~ 2017-12-06 10:29:49.000000000 -0700
+++ tbb-2018_U2/build/Makefile.tbbmalloc 2018-01-22 20:47:30.104350662 -0700
@@ -51,7 +51,7 @@ ORIG_LINK_MALLOC.LIB:=$(LINK_MALLOC.LIB)
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 := $(subst $(WARNING_KEY),,$(M_CPLUS_FLAGS)) $(CXXFLAGS) $(DEFINE_KEY)__TBBMALLOC_BUILD=1
M_INCLUDES := $(INCLUDES) $(INCLUDE_KEY)$(MALLOC_ROOT) $(INCLUDE_KEY)$(MALLOC_SOURCE_ROOT)
# Suppress superfluous warnings for TBBMalloc compilation
@@ -86,7 +86,7 @@ $(MALLOC.DLL) $(MALLOCPROXY.DLL): CPLUS_
$(MALLOC.DLL) $(MALLOCPROXY.DLL): M_CPLUS_FLAGS += $(SDL_FLAGS)
$(MALLOC.DLL): BUILDING_LIBRARY = $(MALLOC.DLL)
$(MALLOC.DLL): $(MALLOC.OBJ) $(MALLOC.RES) $(MALLOC_NO_VERSION.DLL)
- $(subst $(CPLUS),$(CONLY),$(LIB_LINK_CMD)) $(LIB_OUTPUT_KEY)$(MALLOC.DLL) $(MALLOC.OBJ) $(MALLOC.RES) $(LIB_LINK_LIBS) $(MALLOC_LINK_FLAGS)
+ $(LIB_LINK_CMD) $(LIB_OUTPUT_KEY)$(MALLOC.DLL) $(MALLOC.OBJ) $(MALLOC.RES) $(LIB_LINK_LIBS) $(MALLOC_LINK_FLAGS)
ifneq (,$(MALLOCPROXY.DEF))
tbbmallocproxy.def: $(MALLOCPROXY.DEF)

143
tbb.spec
View File

@ -1,46 +1,30 @@
%global upver 2018
%global uprel 5
%if 0%{?fedora} || 0%{?rhel} >= 8
%global with_python3 1
%endif
%global upver 2019
%global uprel 1
%global upfullver %{upver}%{?uprel:_U%{uprel}}
Name: tbb
Summary: The Threading Building Blocks library abstracts low-level threading details
Version: %{upver}%{?uprel:.%{uprel}}
Release: 2%{?dist}
Release: 1%{?dist}
License: ASL 2.0
Group: Development/Tools
URL: http://threadingbuildingblocks.org/
Source0: https://github.com/01org/tbb/archive/%{upver}%{?uprel:_U%{uprel}}.tar.gz
Source0: https://github.com/01org/tbb/archive/%{upfullver}/%{name}-%{upfullver}.tar.gz
# These three are downstream sources.
Source6: tbb.pc
Source7: tbbmalloc.pc
Source8: tbbmalloc_proxy.pc
# Propagate CXXFLAGS variable into flags used when compiling C++.
# This is so that RPM_OPT_FLAGS are respected.
Patch1: tbb-4.4-cxxflags.patch
# For 32-bit x86 only, don't assume that the mfence instruction is available.
# It was added with SSE2. This patch causes a lock xchg instruction to be
# emitted for non-SSE2 builds, and the mfence instruction to be emitted for
# SSE2-enabled builds.
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-2018U5-dont-snip-Wall.patch
Patch0: tbb-2019-dont-snip-Wall.patch
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: python2-devel
BuildRequires: swig
%if 0%{?with_python3}
BuildRequires: python3-devel
%endif
BuildRequires: swig
%description
Threading Building Blocks (TBB) is a C++ runtime library that
@ -58,6 +42,7 @@ maintenance is required as more processor cores become available.
Summary: The Threading Building Blocks C++ headers and shared development libraries
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: cmake-filesystem%{?_isa}
%description devel
Header files and shared object symlinks for the Threading Building
@ -74,36 +59,29 @@ PDF documentation for the user of the Threading Building Block (TBB)
C++ library.
%package -n python2-%{name}
Summary: Python 2 TBB module
%{?python_provide:%python_provide python2-%{name}}
%description -n python2-%{name}
Python 2 TBB module.
%if 0%{?with_python3}
%package -n python3-%{name}
Summary: Python 3 TBB module
%{?python_provide:%python_provide python3-%{name}}
%description -n python3-%{name}
Python 3 TBB module.
%endif
%prep
%autosetup -p1 -n %{name}-%{upver}_U%{uprel}
%autosetup -p1 -n %{name}-%{upfullver}
# For repeatable builds, don't query the hostname or architecture
sed -i 's/"`hostname -s`" ("`uname -m`"/fedorabuild (%{_arch}/' \
build/version_info_linux.sh
# Do not assume the RTM instructions are available
sed -i 's/-mrtm//' build/linux.gcc.inc
# Do not assume the RTM instructions are available.
# Insert --as-needed before the libraries to be linked.
sed -e 's/-mrtm//' \
-e "s|LIB_LINK_FLAGS = |&-Wl,--as-needed $RPM_LD_FLAGS |" \
-i build/linux.gcc.inc
# Invoke the right python binary directly
sed -i 's,env python,python2,' python/TBB.py python/tbb/__*.py
sed -i 's,env python,python3,' python/TBB.py python/tbb/__*.py
# Remove shebang from files that don't need it
sed -i '/^#!/d' python/tbb/{pool,test}.py
@ -115,32 +93,16 @@ if [ "%{_libdir}" != "%{_prefix}/lib" ]; then
rm cmake/TBBMakeConfig.cmake.orig
fi
# Prepare to build the python module for both python 2 and python 3
cp -a python python3
sed -i 's,python,python3,g' python3/Makefile python3/rml/Makefile
sed -i 's,python2,python3,' python3/TBB.py python3/tbb/__*.py
%build
%ifarch %{ix86}
# Build an SSE2-enabled version so the mfence instruction can be used
cp -a build build.orig
make %{?_smp_mflags} tbb_build_prefix=obj stdver=c++14 \
CXXFLAGS="$RPM_OPT_FLAGS -march=pentium4 -msse2" \
LDFLAGS="-Wl,--as-needed $RPM_LD_FLAGS"
mv build build.sse2
mv build.orig build
%endif
make %{?_smp_mflags} tbb_build_prefix=obj stdver=c++14 \
CXXFLAGS="$RPM_OPT_FLAGS" \
LDFLAGS="-Wl,--as-needed $RPM_LD_FLAGS"
CXXFLAGS="$RPM_OPT_FLAGS"
for file in %{SOURCE6} %{SOURCE7} %{SOURCE8}; do
base=$(basename ${file})
sed 's/_FEDORA_VERSION/%{version}/' ${file} > ${base}
touch -r ${file} ${base}
done
# Build for python 2
# Build for python 3
. build/obj_release/tbbvars.sh
pushd python
make %{?_smp_mflags} -C rml stdver=c++14 \
@ -148,21 +110,11 @@ make %{?_smp_mflags} -C rml stdver=c++14 \
PIC_KEY="-fPIC -Wl,--as-needed" \
LDFLAGS="$RPM_LD_FLAGS"
cp -p rml/libirml.so* .
%py2_build
popd
%if 0%{?with_python3}
# Build for python 3
pushd python3
make %{?_smp_mflags} -C rml stdver=c++14 \
CPLUS_FLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD" \
PIC_KEY="-fPIC -Wl,--as-needed" \
LDFLAGS="$RPM_LD_FLAGS"
cp -p rml/libirml.so* .
%py3_build
popd
%endif
# Build the documentation
make doxygen
%check
make test tbb_build_prefix=obj stdver=c++14 CXXFLAGS="$RPM_OPT_FLAGS"
@ -171,15 +123,6 @@ make test tbb_build_prefix=obj stdver=c++14 CXXFLAGS="$RPM_OPT_FLAGS"
mkdir -p $RPM_BUILD_ROOT/%{_libdir}
mkdir -p $RPM_BUILD_ROOT/%{_includedir}
%ifarch %{ix86}
mkdir -p $RPM_BUILD_ROOT/%{_libdir}/sse2
pushd build.sse2/obj_release
for file in libtbb{,malloc{,_proxy}}; do
install -p -D -m 755 ${file}.so.2 $RPM_BUILD_ROOT/%{_libdir}/sse2
done
popd
%endif
pushd build/obj_release
for file in libtbb{,malloc{,_proxy}}; do
install -p -D -m 755 ${file}.so.2 $RPM_BUILD_ROOT/%{_libdir}
@ -202,68 +145,54 @@ done
mkdir -p $RPM_BUILD_ROOT%{_includedir}/rml
cp -p src/rml/include/*.h $RPM_BUILD_ROOT%{_includedir}/rml
# Python 2 install
# Python 3 install
. build/obj_release/tbbvars.sh
pushd python
%py2_install
chmod a+x $RPM_BUILD_ROOT%{python2_sitearch}/TBB.py
chmod a+x $RPM_BUILD_ROOT%{python2_sitearch}/tbb/__*.py
cp -p libirml.so.1 $RPM_BUILD_ROOT%{_libdir}
ln -s libirml.so.1 $RPM_BUILD_ROOT%{_libdir}/libirml.so
popd
%if 0%{?with_python3}
# Python 3 install
pushd python3
%py3_install
chmod a+x $RPM_BUILD_ROOT%{python3_sitearch}/TBB.py
chmod a+x $RPM_BUILD_ROOT%{python3_sitearch}/tbb/__*.py
cp -p libirml.so.1 $RPM_BUILD_ROOT%{_libdir}
ln -s libirml.so.1 $RPM_BUILD_ROOT%{_libdir}/libirml.so
popd
%endif
# Install the cmake files
mkdir -p $RPM_BUILD_ROOT%{_libdir}/cmake
cp -a cmake $RPM_BUILD_ROOT%{_libdir}/cmake/%{name}
rm $RPM_BUILD_ROOT%{_libdir}/cmake/%{name}/README.rst
%ldconfig_scriptlets libs
%files
%doc doc/Release_Notes.txt README.md
%license LICENSE
%{_libdir}/*.so.2
%{_libdir}/libtbb.so.2
%{_libdir}/libtbbmalloc.so.2
%{_libdir}/libtbbmalloc_proxy.so.2
%{_libdir}/libirml.so.1
%ifarch %{ix86}
%{_libdir}/sse2/*.so.2
%endif
%files devel
%doc CHANGES cmake/README.rst
%{_includedir}/rml
%{_includedir}/tbb
%{_includedir}/rml/
%{_includedir}/tbb/
%{_libdir}/*.so
%{_libdir}/cmake/
%{_libdir}/cmake/tbb/
%{_libdir}/pkgconfig/*.pc
%files doc
%doc doc/Release_Notes.txt
%doc doc/html
%doc html
%files -n python2-%{name}
%doc python/index.html
%{python2_sitearch}/TBB*
%{python2_sitearch}/tbb/
%if 0%{?with_python3}
%files -n python3-%{name}
%doc python3/index.html
%doc python/index.html
%{python3_sitearch}/TBB*
%{python3_sitearch}/tbb/
%{python3_sitearch}/__pycache__/TBB*
%endif
%changelog
* Thu Oct 4 2018 Jerry James <loganjerry@gmail.com> - 2019.1-1
- Rebase to 2019 update 1
- Drop special SSE2 build for 32-bit x86 as that is now default
- Drop unneeded -cxxflags patch
- Drop python 2 support (bz 1629761)
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2018.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild