From 8cb239c353f2dd691c218d82e3a0c7bf334e220f Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Dec 17 2005 17:26:24 +0000 Subject: 3.2.3-54.fc5 --- diff --git a/compat-gcc-32.spec b/compat-gcc-32.spec index 9a4c4b3..02dedbf 100644 --- a/compat-gcc-32.spec +++ b/compat-gcc-32.spec @@ -271,6 +271,9 @@ OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-m64//g;s/-m32//g;s/-m31//g'` %ifarch %{ix86} OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mtune=pentium4/-mcpu=i686/g'` %endif +%ifarch x86_64 +OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mtune=nocona//g'` +%endif %ifarch sparc sparc64 OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mcpu=ultrasparc/-mtune=ultrasparc/g'` %endif diff --git a/compat-libstdc++33++-fully-dynamic-strings.patch b/compat-libstdc++33++-fully-dynamic-strings.patch new file mode 100644 index 0000000..41550cd --- /dev/null +++ b/compat-libstdc++33++-fully-dynamic-strings.patch @@ -0,0 +1,60 @@ +2004-10-28 Paolo Carlini + + PR libstdc++/16612 + * include/bits/basic_string.h (basic_string()): When + _GLIBCXX_FULLY_DYNAMIC_STRING is defined, don't deal with _S_empty_rep. + * include/bits/basic_string.tcc (_S_construct): Likewise. + +--- libstdc++33-v3/include/bits/basic_string.tcc.jj 2002-11-09 18:42:55.000000000 +0100 ++++ libstdc++33-v3/include/bits/basic_string.tcc 2004-11-12 14:17:19.946131774 +0100 +@@ -77,8 +77,10 @@ namespace std + _S_construct(_InIter __beg, _InIter __end, const _Alloc& __a, + input_iterator_tag) + { ++#ifndef _GLIBCXX_FULLY_DYNAMIC_STRING + if (__beg == __end && __a == _Alloc()) + return _S_empty_rep()._M_refcopy(); ++#endif + // Avoid reallocation for common case. + _CharT __buf[100]; + size_type __i = 0; +@@ -139,11 +141,13 @@ namespace std + { + size_type __dnew = static_cast(distance(__beg, __end)); + ++#ifndef _GLIBCXX_FULLY_DYNAMIC_STRING + if (__beg == __end && __a == _Alloc()) + return _S_empty_rep()._M_refcopy(); ++#endif + + // NB: Not required, but considered best practice. +- if (__builtin_expect(__beg == _InIter(), 0)) ++ if (__builtin_expect(__beg == _InIter() && __beg != __end, 0)) + __throw_logic_error("attempt to create string with null pointer"); + + // Check for out_of_range and length_error exceptions. +@@ -166,8 +170,10 @@ namespace std + basic_string<_CharT, _Traits, _Alloc>:: + _S_construct(size_type __n, _CharT __c, const _Alloc& __a) + { ++#ifndef _GLIBCXX_FULLY_DYNAMIC_STRING + if (__n == 0 && __a == _Alloc()) + return _S_empty_rep()._M_refcopy(); ++#endif + + // Check for out_of_range and length_error exceptions. + _Rep* __r = _Rep::_S_create(__n, __a); +--- libstdc++33-v3/include/bits/basic_string.h.jj 2002-05-22 15:39:29.000000000 +0200 ++++ libstdc++33-v3/include/bits/basic_string.h 2004-11-12 14:14:42.831975711 +0100 +@@ -923,7 +923,11 @@ namespace std + template + inline basic_string<_CharT, _Traits, _Alloc>:: + basic_string() ++#ifndef _GLIBCXX_FULLY_DYNAMIC_STRING + : _M_dataplus(_S_empty_rep()._M_refcopy(), _Alloc()) { } ++#else ++ : _M_dataplus(_S_construct(size_type(), _CharT(), _Alloc()), _Alloc()) { } ++#endif + + // operator+ + template