Build everything MT-only; ditch tagged layout

This commit is contained in:
Petr Machata 2013-06-27 17:36:23 +02:00
parent 60a15dfc84
commit e7f22175bb
2 changed files with 79 additions and 67 deletions

View File

@ -34,7 +34,7 @@ Name: boost
Summary: The free peer-reviewed portable C++ source libraries Summary: The free peer-reviewed portable C++ source libraries
Version: 1.53.0 Version: 1.53.0
%define version_enc 1_53_0 %define version_enc 1_53_0
Release: 11%{?dist} Release: 12%{?dist}
License: Boost and MIT and Python License: Boost and MIT and Python
%define toplev_dirname %{name}_%{version_enc} %define toplev_dirname %{name}_%{version_enc}
@ -42,7 +42,7 @@ URL: http://www.boost.org
Group: System Environment/Libraries Group: System Environment/Libraries
Source0: http://downloads.sourceforge.net/%{name}/%{toplev_dirname}.tar.bz2 Source0: http://downloads.sourceforge.net/%{name}/%{toplev_dirname}.tar.bz2
Source1: ver.py Source1: ver.py
Source2: libboost_thread-mt.so Source2: libboost_thread.so
# From the version 13 of Fedora, the Boost libraries are delivered # From the version 13 of Fedora, the Boost libraries are delivered
# with sonames equal to the Boost version (e.g., 1.41.0). # with sonames equal to the Boost version (e.g., 1.41.0).
@ -718,12 +718,12 @@ sed 's/%%{version}/%{version}/g' %{SOURCE2} > $(basename %{SOURCE2})
# eventually done. # eventually done.
echo ============================= build serial ================== echo ============================= build serial ==================
./b2 -d+2 -q %{?_smp_mflags} --layout=tagged \ ./b2 -d+2 -q %{?_smp_mflags} \
--without-mpi --without-graph_parallel --build-dir=serial \ --without-mpi --without-graph_parallel --build-dir=serial \
%if !%{with context} %if !%{with context}
--without-context \ --without-context \
%endif %endif
variant=release threading=single,multi debug-symbols=on pch=off \ variant=release threading=multi debug-symbols=on pch=off \
python=%{python2_version} stage python=%{python2_version} stage
# Build MPI parts of Boost with OpenMPI support # Build MPI parts of Boost with OpenMPI support
@ -740,8 +740,7 @@ module purge ||:
%if %{with openmpi} %if %{with openmpi}
%{_openmpi_load} %{_openmpi_load}
echo ============================= build $MPI_COMPILER ================== echo ============================= build $MPI_COMPILER ==================
# This doesn't seem to allow single-threaded builds anymore. ./b2 -d+2 -q %{?_smp_mflags} \
./b2 -d+2 -q %{?_smp_mflags} --layout=tagged \
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \ --with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
variant=release threading=multi debug-symbols=on pch=off \ variant=release threading=multi debug-symbols=on pch=off \
python=%{python2_version} stage python=%{python2_version} stage
@ -753,7 +752,7 @@ export PATH=/bin${PATH:+:}$PATH
%if %{with mpich} %if %{with mpich}
%{_mpich_load} %{_mpich_load}
echo ============================= build $MPI_COMPILER ================== echo ============================= build $MPI_COMPILER ==================
./b2 -d+2 -q %{?_smp_mflags} --layout=tagged \ ./b2 -d+2 -q %{?_smp_mflags} \
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \ --with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
variant=release threading=multi debug-symbols=on pch=off \ variant=release threading=multi debug-symbols=on pch=off \
python=%{python2_version} stage python=%{python2_version} stage
@ -783,7 +782,7 @@ module purge ||:
%if %{with openmpi} %if %{with openmpi}
%{_openmpi_load} %{_openmpi_load}
echo ============================= install $MPI_COMPILER ================== echo ============================= install $MPI_COMPILER ==================
./b2 -q %{?_smp_mflags} --layout=tagged \ ./b2 -q %{?_smp_mflags} \
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \ --with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
--stagedir=${RPM_BUILD_ROOT}${MPI_HOME} \ --stagedir=${RPM_BUILD_ROOT}${MPI_HOME} \
variant=release threading=multi debug-symbols=on pch=off \ variant=release threading=multi debug-symbols=on pch=off \
@ -799,7 +798,7 @@ export PATH=/bin${PATH:+:}$PATH
%if %{with mpich} %if %{with mpich}
%{_mpich_load} %{_mpich_load}
echo ============================= install $MPI_COMPILER ================== echo ============================= install $MPI_COMPILER ==================
./b2 -q %{?_smp_mflags} --layout=tagged \ ./b2 -q %{?_smp_mflags} \
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \ --with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
--stagedir=${RPM_BUILD_ROOT}${MPI_HOME} \ --stagedir=${RPM_BUILD_ROOT}${MPI_HOME} \
variant=release threading=multi debug-symbols=on pch=off \ variant=release threading=multi debug-symbols=on pch=off \
@ -813,20 +812,20 @@ export PATH=/bin${PATH:+:}$PATH
%endif %endif
echo ============================= install serial ================== echo ============================= install serial ==================
./b2 -d+2 -q %{?_smp_mflags} --layout=tagged \ ./b2 -d+2 -q %{?_smp_mflags} \
--without-mpi --without-graph_parallel --build-dir=serial \ --without-mpi --without-graph_parallel --build-dir=serial \
%if !%{with context} %if !%{with context}
--without-context \ --without-context \
%endif %endif
--prefix=$RPM_BUILD_ROOT%{_prefix} \ --prefix=$RPM_BUILD_ROOT%{_prefix} \
--libdir=$RPM_BUILD_ROOT%{_libdir} \ --libdir=$RPM_BUILD_ROOT%{_libdir} \
variant=release threading=single,multi debug-symbols=on pch=off \ variant=release threading=multi debug-symbols=on pch=off \
python=%{python2_version} install python=%{python2_version} install
# Override DSO symlink with a linker script. See the linker script # Override DSO symlink with a linker script. See the linker script
# itself for details of why we need to do this. # itself for details of why we need to do this.
[ -f $RPM_BUILD_ROOT%{_libdir}/libboost_thread-mt.so ] # Must be present [ -f $RPM_BUILD_ROOT%{_libdir}/libboost_thread.so ] # Must be present
rm -f $RPM_BUILD_ROOT%{_libdir}/libboost_thread-mt.so rm -f $RPM_BUILD_ROOT%{_libdir}/libboost_thread.so
install -p -m 644 $(basename %{SOURCE2}) $RPM_BUILD_ROOT%{_libdir}/ install -p -m 644 $(basename %{SOURCE2}) $RPM_BUILD_ROOT%{_libdir}/
# Add symlinks libboost_{thread,locale,atomic}.so -> *-mt.so # Add symlinks libboost_{thread,locale,atomic}.so -> *-mt.so
@ -1016,120 +1015,123 @@ rm -rf $RPM_BUILD_ROOT
%files atomic %files atomic
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/libboost_atomic-mt.so.%{sonamever} %{_libdir}/libboost_atomic.so.%{sonamever}
%files chrono %files chrono
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/libboost_chrono*.so.%{sonamever} %{_libdir}/libboost_chrono.so.%{sonamever}
%if %{with context} %if %{with context}
%files context %files context
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/libboost_context*.so.%{sonamever} %{_libdir}/libboost_context.so.%{sonamever}
%endif %endif
%files date-time %files date-time
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/libboost_date_time*.so.%{sonamever} %{_libdir}/libboost_date_time.so.%{sonamever}
%files filesystem %files filesystem
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/libboost_filesystem*.so.%{sonamever} %{_libdir}/libboost_filesystem.so.%{sonamever}
%files graph %files graph
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/libboost_graph.so.%{sonamever} %{_libdir}/libboost_graph.so.%{sonamever}
%{_libdir}/libboost_graph-mt.so.%{sonamever}
%files iostreams %files iostreams
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/libboost_iostreams*.so.%{sonamever} %{_libdir}/libboost_iostreams.so.%{sonamever}
%files locale %files locale
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/libboost_locale*.so.%{sonamever} %{_libdir}/libboost_locale.so.%{sonamever}
%files math %files math
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/libboost_math*.so.%{sonamever} %{_libdir}/libboost_math_c99.so.%{sonamever}
%{_libdir}/libboost_math_c99f.so.%{sonamever}
%{_libdir}/libboost_math_c99l.so.%{sonamever}
%{_libdir}/libboost_math_tr1.so.%{sonamever}
%{_libdir}/libboost_math_tr1f.so.%{sonamever}
%{_libdir}/libboost_math_tr1l.so.%{sonamever}
%files test %files test
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/libboost_prg_exec_monitor*.so.%{sonamever} %{_libdir}/libboost_prg_exec_monitor.so.%{sonamever}
%{_libdir}/libboost_unit_test_framework*.so.%{sonamever} %{_libdir}/libboost_unit_test_framework.so.%{sonamever}
%files program-options %files program-options
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/libboost_program_options*.so.%{sonamever} %{_libdir}/libboost_program_options.so.%{sonamever}
%files python %files python
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/libboost_python.so.%{sonamever} %{_libdir}/libboost_python.so.%{sonamever}
%{_libdir}/libboost_python-mt.so.%{sonamever}
%if %{with python3} %if %{with python3}
%files python3 %files python3
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/libboost_python3*.so.%{sonamever} %{_libdir}/libboost_python3.so.%{sonamever}
%files python3-devel %files python3-devel
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/libboost_python3*.so %{_libdir}/libboost_python3.so
%endif %endif
%files random %files random
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/libboost_random*.so.%{sonamever} %{_libdir}/libboost_random.so.%{sonamever}
%files regex %files regex
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/libboost_regex*.so.%{sonamever} %{_libdir}/libboost_regex.so.%{sonamever}
%files serialization %files serialization
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/libboost_serialization*.so.%{sonamever} %{_libdir}/libboost_serialization.so.%{sonamever}
%{_libdir}/libboost_wserialization*.so.%{sonamever} %{_libdir}/libboost_wserialization.so.%{sonamever}
%files signals %files signals
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/libboost_signals*.so.%{sonamever} %{_libdir}/libboost_signals.so.%{sonamever}
%files system %files system
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/libboost_system*.so.%{sonamever} %{_libdir}/libboost_system.so.%{sonamever}
%files thread %files thread
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/libboost_thread*.so.%{sonamever} %{_libdir}/libboost_thread.so.%{sonamever}
%files timer %files timer
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/libboost_timer*.so.%{sonamever} %{_libdir}/libboost_timer.so.%{sonamever}
%files wave %files wave
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/libboost_wave*.so.%{sonamever} %{_libdir}/libboost_wave.so.%{sonamever}
%files doc %files doc
%defattr(-, root, root, -) %defattr(-, root, root, -)
@ -1143,32 +1145,35 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_includedir}/%{name} %{_includedir}/%{name}
%{_libdir}/libboost_atomic*.so %{_libdir}/libboost_atomic.so
%{_libdir}/libboost_chrono*.so %{_libdir}/libboost_chrono.so
%if %{with context} %if %{with context}
%{_libdir}/libboost_context*.so %{_libdir}/libboost_context.so
%endif %endif
%{_libdir}/libboost_date_time*.so %{_libdir}/libboost_date_time.so
%{_libdir}/libboost_filesystem*.so %{_libdir}/libboost_filesystem.so
%{_libdir}/libboost_graph.so %{_libdir}/libboost_graph.so
%{_libdir}/libboost_graph-mt.so %{_libdir}/libboost_iostreams.so
%{_libdir}/libboost_iostreams*.so %{_libdir}/libboost_locale.so
%{_libdir}/libboost_locale*.so %{_libdir}/libboost_math_tr1.so
%{_libdir}/libboost_math*.so %{_libdir}/libboost_math_tr1f.so
%{_libdir}/libboost_prg_exec_monitor*.so %{_libdir}/libboost_math_tr1l.so
%{_libdir}/libboost_unit_test_framework*.so %{_libdir}/libboost_math_c99.so
%{_libdir}/libboost_program_options*.so %{_libdir}/libboost_math_c99f.so
%{_libdir}/libboost_python-mt.so %{_libdir}/libboost_math_c99l.so
%{_libdir}/libboost_prg_exec_monitor.so
%{_libdir}/libboost_unit_test_framework.so
%{_libdir}/libboost_program_options.so
%{_libdir}/libboost_python.so %{_libdir}/libboost_python.so
%{_libdir}/libboost_random*.so %{_libdir}/libboost_random.so
%{_libdir}/libboost_regex*.so %{_libdir}/libboost_regex.so
%{_libdir}/libboost_serialization*.so %{_libdir}/libboost_serialization.so
%{_libdir}/libboost_wserialization*.so %{_libdir}/libboost_wserialization.so
%{_libdir}/libboost_signals*.so %{_libdir}/libboost_signals.so
%{_libdir}/libboost_system*.so %{_libdir}/libboost_system.so
%{_libdir}/libboost_thread*.so %{_libdir}/libboost_thread.so
%{_libdir}/libboost_timer*.so %{_libdir}/libboost_timer.so
%{_libdir}/libboost_wave*.so %{_libdir}/libboost_wave.so
%files static %files static
%defattr(-, root, root, -) %defattr(-, root, root, -)
@ -1187,7 +1192,7 @@ rm -rf $RPM_BUILD_ROOT
%files openmpi %files openmpi
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/openmpi/lib/libboost_mpi-mt.so.%{sonamever} %{_libdir}/openmpi/lib/libboost_mpi.so.%{sonamever}
%files openmpi-devel %files openmpi-devel
%defattr(-, root, root, -) %defattr(-, root, root, -)
@ -1197,13 +1202,13 @@ rm -rf $RPM_BUILD_ROOT
%files openmpi-python %files openmpi-python
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/openmpi/lib/libboost_mpi_python*.so.%{sonamever} %{_libdir}/openmpi/lib/libboost_mpi_python.so.%{sonamever}
%{_libdir}/openmpi/lib/mpi.so %{_libdir}/openmpi/lib/mpi.so
%files graph-openmpi %files graph-openmpi
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/openmpi/lib/libboost_graph_parallel-mt.so.%{sonamever} %{_libdir}/openmpi/lib/libboost_graph_parallel.so.%{sonamever}
%endif %endif
@ -1213,7 +1218,7 @@ rm -rf $RPM_BUILD_ROOT
%files mpich %files mpich
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/mpich/lib/libboost_mpi-mt.so.%{sonamever} %{_libdir}/mpich/lib/libboost_mpi.so.%{sonamever}
%files mpich-devel %files mpich-devel
%defattr(-, root, root, -) %defattr(-, root, root, -)
@ -1223,13 +1228,13 @@ rm -rf $RPM_BUILD_ROOT
%files mpich-python %files mpich-python
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/mpich/lib/libboost_mpi_python*.so.%{sonamever} %{_libdir}/mpich/lib/libboost_mpi_python.so.%{sonamever}
%{_libdir}/mpich/lib/mpi.so %{_libdir}/mpich/lib/mpi.so
%files graph-mpich %files graph-mpich
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/mpich/lib/libboost_graph_parallel-mt.so.%{sonamever} %{_libdir}/mpich/lib/libboost_graph_parallel.so.%{sonamever}
%endif %endif
@ -1245,6 +1250,13 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/bjam.1* %{_mandir}/man1/bjam.1*
%changelog %changelog
* Fri Jul 26 2013 Petr Machata <pmachata@redhat.com> - 1.53.0-12
- There's no physical difference between single-threaded and
multi-threaded builds, except some libraries are only built in
multi-threaded mode. So build everything in multi-threaded mode,
and ditch tagged layout, which we don't need anymore.
https://bugzilla.redhat.com/show_bug.cgi?id=971956
* Fri Jul 26 2013 Petr Machata <pmachata@redhat.com> - 1.53.0-11 * Fri Jul 26 2013 Petr Machata <pmachata@redhat.com> - 1.53.0-11
- Add Obsoletes for odeint (bug 892850) - Add Obsoletes for odeint (bug 892850)

View File

@ -8,5 +8,5 @@
transitive one. Hence this linker script, which brings in the transitive one. Hence this linker script, which brings in the
Boost.System DSO. */ Boost.System DSO. */
INPUT(libboost_thread-mt.so.%{version}) INPUT(libboost_thread.so.%{version})
INPUT(libboost_system-mt.so.%{version}) INPUT(libboost_system.so.%{version})