summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2015-03-24 14:23:14 +0000
committerjoerg <joerg@pkgsrc.org>2015-03-24 14:23:14 +0000
commit1a3c8369d63a565911cbf6a5b2080aaadf7140ab (patch)
tree6d945f6352669eb0a5a030ace06965dea3a076ce
parent4c5c6d54b335d869e663e8389588f4fa7d5e5259 (diff)
downloadpkgsrc-1a3c8369d63a565911cbf6a5b2080aaadf7140ab.tar.gz
Use C++11 containers in gold for libc++, old ext version doesn't work on
ARM due to lack of long long support.
-rw-r--r--devel/binutils/distinfo6
-rw-r--r--devel/binutils/patches/patch-gold_stringpool.cc16
-rw-r--r--devel/binutils/patches/patch-gold_system.h26
-rw-r--r--devel/binutils/patches/patch-include_safe-ctype.h20
4 files changed, 63 insertions, 5 deletions
diff --git a/devel/binutils/distinfo b/devel/binutils/distinfo
index 036c68cc4c2..ca5fe549c7a 100644
--- a/devel/binutils/distinfo
+++ b/devel/binutils/distinfo
@@ -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-gas_config_tc-i386.c) = 16b04ee6c3c46db375c883b4338bf5d796174458
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 --git a/devel/binutils/patches/patch-gold_stringpool.cc b/devel/binutils/patches/patch-gold_stringpool.cc
new file mode 100644
index 00000000000..6931f7816cd
--- /dev/null
+++ b/devel/binutils/patches/patch-gold_stringpool.cc
@@ -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 --git a/devel/binutils/patches/patch-gold_system.h b/devel/binutils/patches/patch-gold_system.h
index c191e97fce5..13e0f84f2d6 100644
--- a/devel/binutils/patches/patch-gold_system.h
+++ b/devel/binutils/patches/patch-gold_system.h
@@ -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 --git a/devel/binutils/patches/patch-include_safe-ctype.h b/devel/binutils/patches/patch-include_safe-ctype.h
new file mode 100644
index 00000000000..f74edadd0b1
--- /dev/null
+++ b/devel/binutils/patches/patch-include_safe-ctype.h
@@ -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 */