diff options
author | Ian Lance Taylor <ian@airs.com> | 2009-12-29 22:49:13 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2009-12-29 22:49:13 +0000 |
commit | 084e2665e2f76ce0106595e62bd31bd33d9c6190 (patch) | |
tree | 10d6dc3117e59974bfb0d89189b86452f4cc3483 /gold/configure.ac | |
parent | 250acde31a8008cfcbd969d25fb5b91ad9eaff34 (diff) | |
download | gdb-084e2665e2f76ce0106595e62bd31bd33d9c6190.zip gdb-084e2665e2f76ce0106595e62bd31bd33d9c6190.tar.gz gdb-084e2665e2f76ce0106595e62bd31bd33d9c6190.tar.bz2 |
* configure.ac: Set the MCMODEL_MEDIUM conditional to false if
using a version of gcc before 4.1.
* configure: Rebuild.
Diffstat (limited to 'gold/configure.ac')
-rw-r--r-- | gold/configure.ac | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gold/configure.ac b/gold/configure.ac index f279b45..7102670 100644 --- a/gold/configure.ac +++ b/gold/configure.ac @@ -227,8 +227,20 @@ AM_CONDITIONAL(FN_PTRS_IN_SO_WITHOUT_PIC, [ *) true;; esac]) +dnl Test for gcc 4.1 or later. Full support for -mcmodel=medium is +dnl only available in gcc 4.1. +AC_CACHE_CHECK([for gcc >= 4.1], [gold_cv_prog_gcc41], +[AC_COMPILE_IFELSE([ +#if !defined __GNUC__ +error +#elif __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 1) +error +#endif +], [gold_cv_prog_gcc41=yes], [gold_cv_prog_gcc41=no])]) + dnl Whether we can test -mcmodel=medium. -AM_CONDITIONAL(MCMODEL_MEDIUM, [test "$target_cpu" = "x86_64"]) +AM_CONDITIONAL(MCMODEL_MEDIUM, +[test "$target_cpu" = "x86_64" -a "$gold_cv_prog_gcc41" = "yes"]) dnl Test for __thread support. AC_CACHE_CHECK([for thread support], [gold_cv_c_thread], |