Fix Boost.UUID comparison, honor optflags

This commit is contained in:
Petr Machata 2015-02-09 17:07:18 +01:00
parent 7c71c91f42
commit 19702186d2
3 changed files with 96 additions and 3 deletions

View File

@ -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 <pch>on : <pch-file> ;
# Declare flags and action for compilation.
-toolset.flags gcc.compile OPTIONS <optimization>off : -O0 ;
-toolset.flags gcc.compile OPTIONS <optimization>speed : -O3 ;
-toolset.flags gcc.compile OPTIONS <optimization>space : -Os ;
+toolset.flags gcc.compile OPTIONS <optimization>off : ;
+toolset.flags gcc.compile OPTIONS <optimization>speed : ;
+toolset.flags gcc.compile OPTIONS <optimization>space : ;
-toolset.flags gcc.compile OPTIONS <inlining>off : -fno-inline ;
-toolset.flags gcc.compile OPTIONS <inlining>on : -Wno-inline ;
-toolset.flags gcc.compile OPTIONS <inlining>full : -finline-functions -Wno-inline ;
+toolset.flags gcc.compile OPTIONS <inlining>off : ;
+toolset.flags gcc.compile OPTIONS <inlining>on : ;
+toolset.flags gcc.compile OPTIONS <inlining>full : ;
-toolset.flags gcc.compile OPTIONS <warnings>off : -w ;
-toolset.flags gcc.compile OPTIONS <warnings>on : -Wall ;
-toolset.flags gcc.compile OPTIONS <warnings>all : -Wall -pedantic ;
+toolset.flags gcc.compile OPTIONS <warnings>off : ;
+toolset.flags gcc.compile OPTIONS <warnings>on : ;
+toolset.flags gcc.compile OPTIONS <warnings>all : ;
toolset.flags gcc.compile OPTIONS <warnings-as-errors>on : -Werror ;
toolset.flags gcc.compile OPTIONS <debug-symbols>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

View File

@ -0,0 +1,22 @@
From fc32eea4ac9e514a7d210306cd9fa3a017dfe02c Mon Sep 17 00:00:00 2001
From: VemundH <vehandel@online.no>
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

View File

@ -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 : : : <compileflags>-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 : : : <compileflags>$(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 <pmachata@redhat.com> - 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 <pmachata@redhat.com> - 1.57.0-2
- Change Provides: and Obosoletes: back to not use %%{?_isa}
- Enable Boost.Context on PowerPC, it should now be supported