diff options
author | bapt <bapt@FreeBSD.org> | 2013-08-31 21:26:26 +0800 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2013-08-31 21:26:26 +0800 |
commit | 77f1590c0a5853077a176a0d971cf35ae2c35266 (patch) | |
tree | 5b1f6e1054f8d200fdc7418e32cd1d7a82f424c9 /devel/binutils | |
parent | ed2a14600ffaa021ee0bf45dd44236b7fe69577a (diff) | |
download | freebsd-ports-gnome-77f1590c0a5853077a176a0d971cf35ae2c35266.tar.gz freebsd-ports-gnome-77f1590c0a5853077a176a0d971cf35ae2c35266.tar.zst freebsd-ports-gnome-77f1590c0a5853077a176a0d971cf35ae2c35266.zip |
Fix build with libc++
Submitted by: theraven
With hat: portmgr
Diffstat (limited to 'devel/binutils')
-rw-r--r-- | devel/binutils/files/patch-gold_gold.h | 31 | ||||
-rw-r--r-- | devel/binutils/files/patch-include__safe-ctype.h | 17 |
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 */ |