aboutsummaryrefslogtreecommitdiff
path: root/gold/configure
diff options
context:
space:
mode:
authorChris Demetriou <cgd@google.com>2009-04-24 19:33:42 +0000
committerChris Demetriou <cgd@google.com>2009-04-24 19:33:42 +0000
commit40fde48809fd5e9473aa572eee879bb70ce81258 (patch)
tree4eb82904a82ec874a41efeb8c3194510fce0f6dc /gold/configure
parent92846e72ad2df2adc38e1e1db776576cf74db2df (diff)
downloadgdb-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')
-rwxr-xr-xgold/configure67
1 files changed, 67 insertions, 0 deletions
diff --git a/gold/configure b/gold/configure
index 8cd5153..45a2c24 100755
--- a/gold/configure
+++ b/gold/configure
@@ -6855,6 +6855,73 @@ fi
done
+# Use of ::std::tr1::unordered_map::rehash causes undefined symbols
+# at link time with some versions of GCC.
+echo "$as_me:$LINENO: checking whether ::std::tr1::unordered_map::rehash is usable." >&5
+echo $ECHO_N "checking whether ::std::tr1::unordered_map::rehash is usable.... $ECHO_C" >&6
+if test "${gold_cv_unordered_map_rehash+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <tr1/unordered_map>
+void bar() { ::std::tr1::unordered_map<int, int> x; x.rehash(10); }
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ gold_cv_unordered_map_rehash=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gold_cv_unordered_map_rehash=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gold_cv_unordered_map_rehash" >&5
+echo "${ECHO_T}$gold_cv_unordered_map_rehash" >&6
+if test "$gold_cv_unordered_map_rehash" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TR1_UNORDERED_MAP_REHASH 1
+_ACEOF
+
+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.