diff options
author | Chris Demetriou <cgd@google.com> | 2009-04-24 19:33:42 +0000 |
---|---|---|
committer | Chris Demetriou <cgd@google.com> | 2009-04-24 19:33:42 +0000 |
commit | 40fde48809fd5e9473aa572eee879bb70ce81258 (patch) | |
tree | 4eb82904a82ec874a41efeb8c3194510fce0f6dc /gold/configure.ac | |
parent | 92846e72ad2df2adc38e1e1db776576cf74db2df (diff) | |
download | gdb-40fde48809fd5e9473aa572eee879bb70ce81258.zip gdb-40fde48809fd5e9473aa572eee879bb70ce81258.tar.gz gdb-40fde48809fd5e9473aa572eee879bb70ce81258.tar.bz2 |
2009-04-23 Chris Demetriou <cgd@google.com>
* configure.ac (HAVE_TR1_UNORDERED_MAP_REHASH): New define.
* configure: Regenerate.
* config.in: Regenerate.
* gold.h: Avoid std::tr1::unordered_map and std::tr1::unordered_set
if HAVE_TR1_UNORDERED_MAP_REHASH is not defined.
Diffstat (limited to 'gold/configure.ac')
-rw-r--r-- | gold/configure.ac | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gold/configure.ac b/gold/configure.ac index e8d5762..ad04fa6 100644 --- a/gold/configure.ac +++ b/gold/configure.ac @@ -325,6 +325,19 @@ AC_CHECK_HEADERS(ext/hash_map ext/hash_set) AC_CHECK_HEADERS(byteswap.h) AC_CHECK_FUNCS(mallinfo posix_fallocate) +# Use of ::std::tr1::unordered_map::rehash causes undefined symbols +# at link time with some versions of GCC. +AC_CACHE_CHECK([whether ::std::tr1::unordered_map::rehash is usable.], +[gold_cv_unordered_map_rehash], +[AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#include <tr1/unordered_map> +void bar() { ::std::tr1::unordered_map<int, int> x; x.rehash(10); } +]])], [gold_cv_unordered_map_rehash=yes], [gold_cv_unordered_map_rehash=no])]) +if test "$gold_cv_unordered_map_rehash" = "yes"; then + AC_DEFINE(HAVE_TR1_UNORDERED_MAP_REHASH, 1, + [Define if ::std::tr1::unordered_map::rehash is usable]) +fi + # gcc 4.3.0 doesn't recognize the printf attribute on a template # function. Check for that. This is gcc bug 35546. This test can # probably be removed after the bug has been fixed for a while. |