svn commit: r325806 - head/devel/binutils/files
Baptiste Daroussin
bapt at FreeBSD.org
Sat Aug 31 13:26:27 UTC 2013
Author: bapt
Date: Sat Aug 31 13:26:26 2013
New Revision: 325806
URL: http://svnweb.freebsd.org/changeset/ports/325806
Log:
Fix build with libc++
Submitted by: theraven
With hat: portmgr
Added:
head/devel/binutils/files/patch-gold_gold.h (contents, props changed)
head/devel/binutils/files/patch-include__safe-ctype.h (contents, props changed)
Added: head/devel/binutils/files/patch-gold_gold.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/binutils/files/patch-gold_gold.h Sat Aug 31 13:26:26 2013 (r325806)
@@ -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>
Added: head/devel/binutils/files/patch-include__safe-ctype.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/binutils/files/patch-include__safe-ctype.h Sat Aug 31 13:26:26 2013 (r325806)
@@ -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 */
More information about the svn-ports-head
mailing list