summaryrefslogtreecommitdiffstats
path: root/gold/configure.ac
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2012-07-10 14:54:29 +0000
committerIan Lance Taylor <ian@airs.com>2012-07-10 14:54:29 +0000
commit81c82a68dc3bb09bd3b5b4101ed9737814023f1a (patch)
tree31f433029323c903f3cb215064e5f10ed627dc2b /gold/configure.ac
parent686f09d02169f2e74f4465ed61f5be6f6664749b (diff)
downloadppe42-binutils-81c82a68dc3bb09bd3b5b4101ed9737814023f1a.tar.gz
ppe42-binutils-81c82a68dc3bb09bd3b5b4101ed9737814023f1a.zip
PR gold/14309
* configure.ac: Test whether std::tr1::hash<off_t> works. * gold.h: Add a specialization for std::tr1::hash<off_t> if needed. * output.h (class Output_fill): Add virtual destructor. * configure, config.in: Rebuild.
Diffstat (limited to 'gold/configure.ac')
-rw-r--r--gold/configure.ac19
1 files changed, 19 insertions, 0 deletions
diff --git a/gold/configure.ac b/gold/configure.ac
index fdea6291ed..5e3dc0601c 100644
--- a/gold/configure.ac
+++ b/gold/configure.ac
@@ -515,6 +515,25 @@ if test "$gold_cv_unordered_map_rehash" = "yes"; then
[Define if ::std::tr1::unordered_map::rehash is usable])
fi
+# Use of tr1/unordered_map with off_t as a key is not supported on GCC
+# 4.1.xx when compiling in 32-bit mode with a 64-bit off_t type.
+AC_CACHE_CHECK([whether std::tr1::hash<off_t> is defined],
+[gold_cv_hash_off_t],
+[CXXFLAGS_hold=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $LFS_CFLAGS"
+AC_COMPILE_IFELSE([
+#include <sys/types.h>
+#include <tr1/unordered_map>
+std::tr1::hash<off_t> h;
+],
+[gold_cv_hash_off_t=yes],
+[gold_cv_hash_off_t=no])
+CXXFLAGS=$CFLAGS_hold])
+if test "$gold_cv_hash_off_t" = "yes"; then
+ AC_DEFINE(HAVE_TR1_HASH_OFF_T, 1,
+ [Define if std::tr1::hash<off_t> 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.
OpenPOWER on IntegriCloud