aboutsummaryrefslogtreecommitdiff
path: root/gold/configure.ac
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-01-27 23:23:37 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-01-27 23:23:37 +0000
commit24482ca0577ae94fdfa6523d4a5942fc3a610d47 (patch)
tree9ed331669e50e1e776d9d1ff5627fc93b1c1b442 /gold/configure.ac
parent690834b28c79871fe960ccd34838e82a700ee003 (diff)
downloadgdb-24482ca0577ae94fdfa6523d4a5942fc3a610d47.zip
gdb-24482ca0577ae94fdfa6523d4a5942fc3a610d47.tar.gz
gdb-24482ca0577ae94fdfa6523d4a5942fc3a610d47.tar.bz2
Check if -mcmodel=medium works
2012-01-27 H.J. Lu <hongjiu.lu@intel.com> * configure.ac: Check if -mcmodel=medium works. * configure: Regenerated.
Diffstat (limited to 'gold/configure.ac')
-rw-r--r--gold/configure.ac6
1 files changed, 5 insertions, 1 deletions
diff --git a/gold/configure.ac b/gold/configure.ac
index 1b46f4a..e49bf21 100644
--- a/gold/configure.ac
+++ b/gold/configure.ac
@@ -312,9 +312,13 @@ error
#endif
], [gold_cv_prog_gcc41=yes], [gold_cv_prog_gcc41=no])])
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -mcmodel=medium"
+AC_COMPILE_IFELSE([int i;], [have_mcmodel_medium=yes], [have_mcmodel_medium=no])
+CFLAGS="$save_CFLAGS"
dnl Whether we can test -mcmodel=medium.
AM_CONDITIONAL(MCMODEL_MEDIUM,
-[test "$target_cpu" = "x86_64" -a "$gold_cv_prog_gcc41" = "yes"])
+[test "$target_cpu" = "x86_64" -a "$have_mcmodel_medium" = "yes" -a "$gold_cv_prog_gcc41" = "yes"])
dnl Test for __thread support.
AC_CACHE_CHECK([for thread support], [gold_cv_c_thread],