aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2008-08-18 09:42:17 +0000
committerRoland McGrath <roland@gnu.org>2008-08-18 09:42:17 +0000
commit2cf9ad5752c4a5949409fd7fad986552d1bc6a99 (patch)
tree4f481e84618a9de54dfa63a21e8f2e9345c698ef /configure.in
parent7df49c5d81b9f8ea55f16af939e0662d24cc099e (diff)
downloadglibc-2cf9ad5752c4a5949409fd7fad986552d1bc6a99.zip
glibc-2cf9ad5752c4a5949409fd7fad986552d1bc6a99.tar.gz
glibc-2cf9ad5752c4a5949409fd7fad986552d1bc6a99.tar.bz2
2008-08-18 Roland McGrath <roland@redhat.com>
* configure.in (--with-cpu): Check compiler support for -march/-mcpu. * configure: Regenerated. * config.make.in (cflags-cpu): New substituted variable. (with-cpu): Variable removed. * Makeconfig (+cflags): Use $(cflags-cpu), not $(with-cpu).
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in17
1 files changed, 16 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index cd08a23..1651d38 100644
--- a/configure.in
+++ b/configure.in
@@ -326,7 +326,6 @@ AC_ARG_WITH([cpu],
esac
])
-
# An add-on can set this when it wants to disable the sanity check below.
libc_config_ok=no
@@ -1973,6 +1972,22 @@ EOF
fi
fi
+if test -n "$submachine"; then
+ AC_CACHE_CHECK([for compiler option for CPU variant],
+ libc_cv_cc_submachine, [dnl
+ libc_cv_cc_submachine=no
+ for opt in "-march=$submachine" "-mcpu=$submachine"; do
+ if AC_TRY_COMMAND([${CC-cc} $opt -xc /dev/null -S -o /dev/null]); then
+ libc_cv_cc_submachine="$opt"
+ break
+ fi
+ done])
+ if test "x$libc_cv_cc_submachine" = xno; then
+ AC_MSG_ERROR([${CC-cc} does not support $submachine])
+ fi
+fi
+AC_SUBST(libc_cv_cc_submachine)
+
dnl Check whether we have the gd library available.
AC_MSG_CHECKING(for libgd)
if test "$with_gd" != "no"; then