pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/binutils Use C++11 containers in gold for libc++...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/434efdbd6fa9
branches:  trunk
changeset: 648936:434efdbd6fa9
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Tue Mar 24 14:23:14 2015 +0000

description:
Use C++11 containers in gold for libc++, old ext version doesn't work on
ARM due to lack of long long support.

diffstat:

 devel/binutils/distinfo                           |   6 +++-
 devel/binutils/patches/patch-gold_stringpool.cc   |  16 ++++++++++++++
 devel/binutils/patches/patch-gold_system.h        |  26 ++++++++++++++++++++--
 devel/binutils/patches/patch-include_safe-ctype.h |  20 +++++++++++++++++
 4 files changed, 63 insertions(+), 5 deletions(-)

diffs (99 lines):

diff -r 213fab392ab1 -r 434efdbd6fa9 devel/binutils/distinfo
--- a/devel/binutils/distinfo   Tue Mar 24 13:36:06 2015 +0000
+++ b/devel/binutils/distinfo   Tue Mar 24 14:23:14 2015 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.20 2014/05/27 09:56:10 joerg Exp $
+$NetBSD: distinfo,v 1.21 2015/03/24 14:23:14 joerg Exp $
 
 SHA1 (binutils-2.24.tar.bz2) = 7ac75404ddb3c4910c7594b51ddfc76d4693debb
 RMD160 (binutils-2.24.tar.bz2) = b4aa3ea5ba9d0d9f817b2cf136e7f911f692af8d
@@ -10,7 +10,9 @@
 SHA1 (patch-gold_Makefile.in) = ca87f7589025752713127110cbf9738f1080b62a
 SHA1 (patch-gold_options.h) = 3a1f9f59a1ce105f8f8d5a09fe60e0fe673b61a9
 SHA1 (patch-gold_resolve.cc) = 7e6c45cafddc73a4195c4bdacc43102a0fde3c13
-SHA1 (patch-gold_system.h) = 950e1f0d0cce4df9842d3719221f906ff40b5876
+SHA1 (patch-gold_stringpool.cc) = 16b624c8ffba07f5fb6dc1c787a9b35ffa8d89c3
+SHA1 (patch-gold_system.h) = ae922300660cd9f1105d7fa69cfd4a5d29b8bfd9
+SHA1 (patch-include_safe-ctype.h) = 480c46b1528f623435e9b52b7ba8247745e4e254
 SHA1 (patch-ld_Makefile.am) = 908d0e0e366d08929d27416a3361e1869abd0076
 SHA1 (patch-ld_Makefile.in) = 68eba0b8a12211915a1eb99770011090f5c21ff2
 SHA1 (patch-ld_configure.tgt) = 7809d739e9a681c0ebe3d60f30dc759accdff6b9
diff -r 213fab392ab1 -r 434efdbd6fa9 devel/binutils/patches/patch-gold_stringpool.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/binutils/patches/patch-gold_stringpool.cc   Tue Mar 24 14:23:14 2015 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-gold_stringpool.cc,v 1.1 2015/03/24 14:23:14 joerg Exp $
+
+--- gold/stringpool.cc.orig    2015-03-23 13:45:40.000000000 +0000
++++ gold/stringpool.cc
+@@ -73,7 +73,10 @@ Stringpool_template<Stringpool_char>::re
+ {
+   this->key_to_offset_.reserve(n);
+ 
+-#if defined(HAVE_TR1_UNORDERED_MAP)
++#if __cplusplus >= 201103L || defined(_LIBCPP_VERSION)
++  this->string_set_.rehash(this->string_set_.size() + n);
++  return;
++#elif defined(HAVE_TR1_UNORDERED_MAP)
+   // rehash() implementation is broken in gcc 4.0.3's stl
+   //this->string_set_.rehash(this->string_set_.size() + n);
+   //return;
diff -r 213fab392ab1 -r 434efdbd6fa9 devel/binutils/patches/patch-gold_system.h
--- a/devel/binutils/patches/patch-gold_system.h        Tue Mar 24 13:36:06 2015 +0000
+++ b/devel/binutils/patches/patch-gold_system.h        Tue Mar 24 14:23:14 2015 +0000
@@ -1,8 +1,28 @@
-$NetBSD: patch-gold_system.h,v 1.1 2014/05/27 09:56:33 joerg Exp $
+$NetBSD: patch-gold_system.h,v 1.2 2015/03/24 14:23:14 joerg Exp $
 
---- gold/system.h.orig 2014-05-26 18:29:32.000000000 +0000
+--- gold/system.h.orig 2013-11-04 15:33:39.000000000 +0000
 +++ gold/system.h
-@@ -105,7 +105,7 @@ struct hash<std::string>
+@@ -56,8 +56,18 @@
+ #endif
+ 
+ // Figure out how to get a hash set and a hash map.
++#include <cstddef>
++#if __cplusplus >= 201103L || defined(_LIBCPP_VERSION)
++#include <unordered_set>
++#include <unordered_map>
++
++#define Unordered_set std::unordered_set
++#define Unordered_map std::unordered_map
++#define Unordered_multimap std::unordered_multimap
+ 
+-#if defined(HAVE_TR1_UNORDERED_SET) && defined(HAVE_TR1_UNORDERED_MAP) \
++#define reserve_unordered_map(map, n) ((map)->rehash(n))
++
++#elif defined(HAVE_TR1_UNORDERED_SET) && defined(HAVE_TR1_UNORDERED_MAP) \
+     && defined(HAVE_TR1_UNORDERED_MAP_REHASH)
+ 
+ #include <tr1/unordered_set>
+@@ -105,7 +115,7 @@ struct hash<std::string>
  {
    size_t
    operator()(std::string s) const
diff -r 213fab392ab1 -r 434efdbd6fa9 devel/binutils/patches/patch-include_safe-ctype.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/binutils/patches/patch-include_safe-ctype.h Tue Mar 24 14:23:14 2015 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-include_safe-ctype.h,v 1.1 2015/03/24 14:23:14 joerg Exp $
+
+--- include/safe-ctype.h.orig  2015-03-23 13:28:20.000000000 +0000
++++ include/safe-ctype.h
+@@ -120,6 +120,8 @@ extern const unsigned char  _sch_tolower
+    So we include ctype.h here and then immediately redefine its macros.  */
+ 
+ #include <ctype.h>
++
++#ifndef __cplusplus
+ #undef isalpha
+ #define isalpha(c) do_not_use_isalpha_with_safe_ctype
+ #undef isalnum
+@@ -146,5 +148,6 @@ extern const unsigned char  _sch_tolower
+ #define toupper(c) do_not_use_toupper_with_safe_ctype
+ #undef tolower
+ #define tolower(c) do_not_use_tolower_with_safe_ctype
++#endif
+ 
+ #endif /* SAFE_CTYPE_H */



Home | Main Index | Thread Index | Old Index