aboutsummaryrefslogtreecommitdiff
path: root/devel/binutils
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2013-08-31 13:26:26 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2013-08-31 13:26:26 +0000
commit6bad5fa85fc0cedf263e67827e7724931ccc92e5 (patch)
tree5b1f6e1054f8d200fdc7418e32cd1d7a82f424c9 /devel/binutils
parent1045299f41bad9868a03709cb8476f41b3ddb325 (diff)
downloadports-6bad5fa85fc0cedf263e67827e7724931ccc92e5.tar.gz
ports-6bad5fa85fc0cedf263e67827e7724931ccc92e5.zip
Notes
Diffstat (limited to 'devel/binutils')
-rw-r--r--devel/binutils/files/patch-gold_gold.h31
-rw-r--r--devel/binutils/files/patch-include__safe-ctype.h17
2 files changed, 48 insertions, 0 deletions
diff --git a/devel/binutils/files/patch-gold_gold.h b/devel/binutils/files/patch-gold_gold.h
new file mode 100644
index 000000000000..db1aa8a1c5b3
--- /dev/null
+++ b/devel/binutils/files/patch-gold_gold.h
@@ -0,0 +1,31 @@
+--- ./gold/gold.h 2013-08-31 12:57:14.000000000 +0100
++++ ./gold/gold.h 2013-08-31 12:59:04.000000000 +0100
+@@ -65,8 +65,27 @@
+ #endif
+
+ // Figure out how to get a hash set and a hash map.
++#ifdef __clang__
++#if __has_include(<unordered_set>)
++#define HAVE_CXX11_UNORDERED_SET 1
++#define HAVE_TR1_UNORDERED_SET
++#define HAVE_TR1_UNORDERED_MAP
++#endif
++#endif
++#if HAVE_CXX11_UNORDERED_SET
++
++#include <unordered_set>
++#include <unordered_map>
++
++// We need a template typedef here.
++
++#define Unordered_set std::unordered_set
++#define Unordered_map std::unordered_map
++#define Unordered_multimap std::unordered_multimap
++
++#define reserve_unordered_map(map, n) ((map)->rehash(n))
+
+-#if defined(HAVE_TR1_UNORDERED_SET) && defined(HAVE_TR1_UNORDERED_MAP) \
++#elif defined(HAVE_TR1_UNORDERED_SET) && defined(HAVE_TR1_UNORDERED_MAP) \
+ && defined(HAVE_TR1_UNORDERED_MAP_REHASH)
+
+ #include <tr1/unordered_set>
diff --git a/devel/binutils/files/patch-include__safe-ctype.h b/devel/binutils/files/patch-include__safe-ctype.h
new file mode 100644
index 000000000000..33df553385ab
--- /dev/null
+++ b/devel/binutils/files/patch-include__safe-ctype.h
@@ -0,0 +1,17 @@
+--- ./include/safe-ctype.h.orig 2013-08-31 13:25:21.000000000 +0100
++++ ./include/safe-ctype.h 2013-08-31 13:25:57.000000000 +0100
+@@ -119,6 +119,7 @@
+ including another system header (for instance gnulib's stdint.h).
+ So we include ctype.h here and then immediately redefine its macros. */
+
++#if 0
+ #include <ctype.h>
+ #undef isalpha
+ #define isalpha(c) do_not_use_isalpha_with_safe_ctype
+@@ -146,5 +147,6 @@
+ #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 */