From 19702186d20a6c2831221ad09b732abe2dde812a Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Feb 09 2015 16:07:18 +0000 Subject: Fix Boost.UUID comparison, honor optflags --- diff --git a/boost-1.57.0-build-optflags.patch b/boost-1.57.0-build-optflags.patch new file mode 100644 index 0000000..d0b925f --- /dev/null +++ b/boost-1.57.0-build-optflags.patch @@ -0,0 +1,48 @@ +diff -up ./tools/build/src/tools/gcc.jam~ ./tools/build/src/tools/gcc.jam +--- ./tools/build/src/tools/gcc.jam~ 2015-02-09 15:01:04.850331626 +0100 ++++ ./tools/build/src/tools/gcc.jam 2015-02-09 15:44:29.122307134 +0100 +@@ -366,17 +366,17 @@ generators.override gcc.compile.c++.pch + toolset.flags gcc.compile PCH_FILE on : ; + + # Declare flags and action for compilation. +-toolset.flags gcc.compile OPTIONS off : -O0 ; +-toolset.flags gcc.compile OPTIONS speed : -O3 ; +-toolset.flags gcc.compile OPTIONS space : -Os ; ++toolset.flags gcc.compile OPTIONS off : ; ++toolset.flags gcc.compile OPTIONS speed : ; ++toolset.flags gcc.compile OPTIONS space : ; + +-toolset.flags gcc.compile OPTIONS off : -fno-inline ; +-toolset.flags gcc.compile OPTIONS on : -Wno-inline ; +-toolset.flags gcc.compile OPTIONS full : -finline-functions -Wno-inline ; ++toolset.flags gcc.compile OPTIONS off : ; ++toolset.flags gcc.compile OPTIONS on : ; ++toolset.flags gcc.compile OPTIONS full : ; + +-toolset.flags gcc.compile OPTIONS off : -w ; +-toolset.flags gcc.compile OPTIONS on : -Wall ; +-toolset.flags gcc.compile OPTIONS all : -Wall -pedantic ; ++toolset.flags gcc.compile OPTIONS off : ; ++toolset.flags gcc.compile OPTIONS on : ; ++toolset.flags gcc.compile OPTIONS all : ; + toolset.flags gcc.compile OPTIONS on : -Werror ; + + toolset.flags gcc.compile OPTIONS on : -g ; +@@ -603,7 +603,7 @@ rule compile.fortran ( targets * : sourc + + actions compile.c++ bind PCH_FILE + { +- "$(CONFIG_COMMAND)" $(LANG) -ftemplate-depth-$(TEMPLATE_DEPTH) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" -c -o "$(<:W)" "$(>:W)" ++ "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" -c -o "$(<:W)" "$(>:W)" + } + + actions compile.c bind PCH_FILE +@@ -613,7 +613,7 @@ actions compile.c bind PCH_FILE + + actions compile.c++.preprocess bind PCH_FILE + { +- "$(CONFIG_COMMAND)" $(LANG) -ftemplate-depth-$(TEMPLATE_DEPTH) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" "$(>:W)" -E >"$(<:W)" ++ "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" "$(>:W)" -E >"$(<:W)" + } + + actions compile.c.preprocess bind PCH_FILE diff --git a/boost-1.57.0-uuid-comparison.patch b/boost-1.57.0-uuid-comparison.patch new file mode 100644 index 0000000..7b7f991 --- /dev/null +++ b/boost-1.57.0-uuid-comparison.patch @@ -0,0 +1,22 @@ +From fc32eea4ac9e514a7d210306cd9fa3a017dfe02c Mon Sep 17 00:00:00 2001 +From: VemundH +Date: Tue, 30 Sep 2014 21:53:45 +0200 +Subject: [PATCH] remove incorrect casts + +--- + include/boost/uuid/detail/uuid_x86.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/boost/uuid/detail/uuid_x86.hpp b/include/boost/uuid/detail/uuid_x86.hpp +index 1a329b0..5a2cdec 100644 +--- a/include/boost/uuid/detail/uuid_x86.hpp ++++ b/include/boost/uuid/detail/uuid_x86.hpp +@@ -100,7 +100,7 @@ inline bool operator< (uuid const& lhs, uuid const& rhs) BOOST_NOEXCEPT + cmp = (cmp - 1u) ^ cmp; + rcmp = (rcmp - 1u) ^ rcmp; + +- return static_cast< uint16_t >(cmp) < static_cast< uint16_t >(rcmp); ++ return cmp < rcmp; + } + + } // namespace uuids diff --git a/boost.spec b/boost.spec index a5e6cfd..a6a300a 100644 --- a/boost.spec +++ b/boost.spec @@ -32,7 +32,7 @@ Name: boost Summary: The free peer-reviewed portable C++ source libraries Version: 1.57.0 %define version_enc 1_57_0 -Release: 2%{?dist} +Release: 3%{?dist} License: Boost and MIT and Python %define toplev_dirname %{name}_%{version_enc} @@ -125,6 +125,12 @@ Patch63: boost-1.55.0-python-test-PyImport_AppendInittab.patch # https://github.com/boostorg/signals2/pull/8 Patch64: boost-1.57.0-signals2-weak_ptr.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1190039 +Patch65: boost-1.57.0-build-optflags.patch + +# https://svn.boost.org/trac/boost/ticket/10510 +Patch66: boost-1.57.0-uuid-comparison.patch + %bcond_with tests %bcond_with docs_generated @@ -612,6 +618,8 @@ a number of significant features and is now developed independently %patch62 -p1 %patch63 -p1 %patch64 -p2 +%patch65 -p1 +%patch66 -p2 # At least python2_version needs to be a macro so that it's visible in # %%install as well. @@ -628,10 +636,15 @@ a number of significant features and is now developed independently : PYTHON3_ABIFLAGS=%{python3_abiflags} %endif -cat > ./tools/build/src/user-config.jam << EOF # There are many strict aliasing warnings, and it's not feasible to go # through them all at this time. -using gcc : : : -fno-strict-aliasing ; +export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" + +cat > ./tools/build/src/user-config.jam << "EOF" +import os ; +local RPM_OPT_FLAGS = [ os.environ RPM_OPT_FLAGS ] ; + +using gcc : : : $(RPM_OPT_FLAGS) ; %if %{with openmpi} || %{with mpich} using mpi ; %endif @@ -1226,6 +1239,16 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/bjam.1* %changelog +* Mon Feb 9 2015 Petr Machata - 1.57.0-3 +- Honor RPM_OPT_FLAGS (boost-1.57.0-build-optflags.patch) + - And don't pass -ftemplate-depth at all. The intention there was + to increase the default instantiation depth above the default 17, + but GCC defaults to 900 anyway, and requesting 128 actually lowers + the limit. (The same patch.) + +- Add a patch to fix incorrect operator< in Boost.UUID + (boost-1.57.0-uuid-comparison.patch) + * Thu Jan 29 2015 Petr Machata - 1.57.0-2 - Change Provides: and Obosoletes: back to not use %%{?_isa} - Enable Boost.Context on PowerPC, it should now be supported