aboutsummaryrefslogtreecommitdiff
path: root/gold/configure.ac
diff options
context:
space:
mode:
authorChris Demetriou <cgd@google.com>2008-07-21 05:55:27 +0000
committerChris Demetriou <cgd@google.com>2008-07-21 05:55:27 +0000
commit1d1f116d7e3d2a6ed2410f538b0843453a13a3d1 (patch)
treef85b53e1de62eb5661210007e7f587fa8dd3fb07 /gold/configure.ac
parent89eeb0bc236bdd010f7d3796d4d1e1459a41d196 (diff)
downloadgdb-1d1f116d7e3d2a6ed2410f538b0843453a13a3d1.zip
gdb-1d1f116d7e3d2a6ed2410f538b0843453a13a3d1.tar.gz
gdb-1d1f116d7e3d2a6ed2410f538b0843453a13a3d1.tar.bz2
2008-07-20 Chris Demetriou <cgd@google.com>
* configure.ac (gold_cv_c_random_seed): New configured variable. (RANDOM_SEED_CFLAGS): New substituted variable. * Makefile.am (AM_CFLAGS, AM_CXXFLAGS): Add $(RANDOM_SEED_CFLAGS). * configure: Rebuild. * Makefile.in: Likewise. * testsuite/Makefile.in: Likewise.
Diffstat (limited to 'gold/configure.ac')
-rw-r--r--gold/configure.ac14
1 files changed, 14 insertions, 0 deletions
diff --git a/gold/configure.ac b/gold/configure.ac
index 96733e4..3fbcd0e 100644
--- a/gold/configure.ac
+++ b/gold/configure.ac
@@ -269,6 +269,20 @@ AC_CACHE_CHECK([for constructor priorities], [gold_cv_c_conprio],
AM_CONDITIONAL(CONSTRUCTOR_PRIORITY, test "$gold_cv_c_conprio" = "yes")
+dnl Test for the -frandom-seed option.
+AC_CACHE_CHECK([for -frandom-seed support], [gold_cv_c_random_seed],
+[save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -frandom-seed=foo"
+AC_COMPILE_IFELSE([int i;], [gold_cv_c_random_seed=yes],
+[gold_cv_c_random_seed=no])
+CFLAGS="$save_CFLAGS"])
+if test "$gold_cv_c_random_seed" = "yes"; then
+ # In Makefile, '$@' will be expanded to be the name of the file
+ # being built, providing a unique seed for each file.
+ RANDOM_SEED_CFLAGS=-frandom-seed=\$@
+fi
+AC_SUBST(RANDOM_SEED_CFLAGS)
+
AM_BINUTILS_WARNINGS
WARN_CXXFLAGS=`echo ${WARN_CFLAGS} | sed -e 's/-Wstrict-prototypes//' -e 's/-Wmissing-prototypes//'`