Skip to content
This repository has been archived by the owner on Mar 29, 2019. It is now read-only.

Commit

Permalink
Bug 706129 - patch our libstdc++ for c++11 conformance. r=rail.
Browse files Browse the repository at this point in the history
  • Loading branch information
cixtor committed Nov 29, 2011
1 parent 3929c61 commit c157f46
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 7 deletions.
7 changes: 4 additions & 3 deletions gcc45/centos5-i686/gcc45.spec
Expand Up @@ -2,12 +2,12 @@
%define mpc_version 0.8.1
%define mpfr_version 2.4.2
%define gmp_version 5.0.1
%define gcc_prefix /tools/gcc-4.5-0moz2
%define gcc_prefix /tools/gcc-4.5-0moz3

Name: gcc45_0moz2
Name: gcc45_0moz3
Summary: An interpreted, interactive, object-oriented programming language.
Version: 4.5.2
Release: 0moz2
Release: 0moz3
License: GPL
Group: Development/Languages
Source: http://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-%{version}.tar.bz2
Expand All @@ -17,6 +17,7 @@ Source3: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
# https://bugzilla.mozilla.org/attachment.cgi?id=457606
Patch0: plugin_finish_decl.diff
Patch1: pr49911.diff
Patch2: r159628-r163231-r171807.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root


Expand Down
8 changes: 4 additions & 4 deletions gcc45/centos5-i686/pr49911.diff
@@ -1,6 +1,6 @@
diff -ru gcc-4.5.2/gcc/double-int.c gcc-4.5.2-new/gcc/double-int.c
--- gcc-4.5.2/gcc/double-int.c 2009-11-25 05:55:54.000000000 -0500
+++ gcc-4.5.2-new/gcc/double-int.c 2011-08-17 16:41:13.000000000 -0400
+++ gcc-4.5.2-new/gcc/double-int.c 2011-11-29 10:20:27.625583810 -0500
@@ -296,7 +296,12 @@
tree
double_int_to_tree (tree type, double_int cst)
Expand All @@ -17,7 +17,7 @@ diff -ru gcc-4.5.2/gcc/double-int.c gcc-4.5.2-new/gcc/double-int.c
}
diff -ru gcc-4.5.2/gcc/tree.c gcc-4.5.2-new/gcc/tree.c
--- gcc-4.5.2/gcc/tree.c 2010-07-07 11:24:27.000000000 -0400
+++ gcc-4.5.2-new/gcc/tree.c 2011-08-17 16:42:52.000000000 -0400
+++ gcc-4.5.2-new/gcc/tree.c 2011-11-29 10:20:27.626583813 -0500
@@ -9750,7 +9750,7 @@
tree
upper_bound_in_type (tree outer, tree inner)
Expand Down Expand Up @@ -53,7 +53,7 @@ diff -ru gcc-4.5.2/gcc/tree.c gcc-4.5.2-new/gcc/tree.c
/* Returns the smallest value obtainable by casting something in INNER type to
diff -ru gcc-4.5.2/gcc/tree-vrp.c gcc-4.5.2-new/gcc/tree-vrp.c
--- gcc-4.5.2/gcc/tree-vrp.c 2010-06-14 11:23:31.000000000 -0400
+++ gcc-4.5.2-new/gcc/tree-vrp.c 2011-08-17 14:12:26.000000000 -0400
+++ gcc-4.5.2-new/gcc/tree-vrp.c 2011-11-29 10:20:27.628583820 -0500
@@ -127,10 +127,10 @@
static inline tree
vrp_val_max (const_tree type)
Expand Down Expand Up @@ -271,4 +271,4 @@ diff -ru gcc-4.5.2/gcc/tree-vrp.c gcc-4.5.2-new/gcc/tree-vrp.c
+ max = vrp_val_max (TREE_TYPE (op0));

min = op1;
if (cond_code == GT_EXPR && !is_overflow_infinity (min))
if (cond_code == GT_EXPR && !is_overflow_infinity (min))
98 changes: 98 additions & 0 deletions gcc45/centos5-i686/r159628-r163231-r171807.patch
@@ -0,0 +1,98 @@
diff -ru gcc-4.5.2/libstdc++-v3/include/bits/stl_pair.h gcc-4.5.2-new/libstdc++-v3/include/bits/stl_pair.h
--- gcc-4.5.2/libstdc++-v3/include/bits/stl_pair.h 2010-06-10 06:26:14.000000000 -0400
+++ gcc-4.5.2-new/libstdc++-v3/include/bits/stl_pair.h 2011-11-29 10:25:51.203597393 -0500
@@ -88,6 +88,8 @@
: first(__a), second(__b) { }

#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ pair(const pair&) = default;
+
// DR 811.
template<class _U1, class = typename
std::enable_if<std::is_convertible<_U1, _T1>::value>::type>
@@ -131,6 +133,15 @@

template<class _U1, class _U2>
pair&
+ operator=(const pair<_U1, _U2>& __p)
+ {
+ first = __p.first;
+ second = __p.second;
+ return *this;
+ }
+
+ template<class _U1, class _U2>
+ pair&
operator=(pair<_U1, _U2>&& __p)
{
first = std::move(__p.first);
diff -ru gcc-4.5.2/libstdc++-v3/include/bits/stl_queue.h gcc-4.5.2-new/libstdc++-v3/include/bits/stl_queue.h
--- gcc-4.5.2/libstdc++-v3/include/bits/stl_queue.h 2010-02-04 13:20:34.000000000 -0500
+++ gcc-4.5.2-new/libstdc++-v3/include/bits/stl_queue.h 2011-11-29 10:26:22.511695475 -0500
@@ -1,6 +1,6 @@
// Queue implementation -*- C++ -*-

-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -137,16 +137,6 @@
explicit
queue(_Sequence&& __c = _Sequence())
: c(std::move(__c)) { }
-
- queue(queue&& __q)
- : c(std::move(__q.c)) { }
-
- queue&
- operator=(queue&& __q)
- {
- c = std::move(__q.c);
- return *this;
- }
#endif

/**
@@ -451,17 +441,6 @@
c.insert(c.end(), __first, __last);
std::make_heap(c.begin(), c.end(), comp);
}
-
- priority_queue(priority_queue&& __pq)
- : c(std::move(__pq.c)), comp(std::move(__pq.comp)) { }
-
- priority_queue&
- operator=(priority_queue&& __pq)
- {
- c = std::move(__pq.c);
- comp = std::move(__pq.comp);
- return *this;
- }
#endif

/**
diff -ru gcc-4.5.2/libstdc++-v3/libsupc++/exception_ptr.h gcc-4.5.2-new/libstdc++-v3/libsupc++/exception_ptr.h
--- gcc-4.5.2/libstdc++-v3/libsupc++/exception_ptr.h 2009-11-09 17:09:30.000000000 -0500
+++ gcc-4.5.2-new/libstdc++-v3/libsupc++/exception_ptr.h 2011-11-29 10:26:10.878659023 -0500
@@ -129,7 +129,7 @@
operator==(const exception_ptr&, const exception_ptr&) throw()
__attribute__ ((__pure__));

- const type_info*
+ const class type_info*
__cxa_exception_type() const throw() __attribute__ ((__pure__));
};

diff -ru gcc-4.5.2/libstdc++-v3/libsupc++/nested_exception.h gcc-4.5.2-new/libstdc++-v3/libsupc++/nested_exception.h
--- gcc-4.5.2/libstdc++-v3/libsupc++/nested_exception.h 2010-02-18 12:20:16.000000000 -0500
+++ gcc-4.5.2-new/libstdc++-v3/libsupc++/nested_exception.h 2011-11-29 10:26:10.879659026 -0500
@@ -119,7 +119,7 @@
// with a type that has an accessible nested_exception base.
template<typename _Ex>
inline void
- __throw_with_nested(_Ex&& __ex, const nested_exception* = 0)
+ __throw_with_nested(_Ex&& __ex, const nested_exception*)
{ throw __ex; }

template<typename _Ex>

0 comments on commit c157f46

Please sign in to comment.