From 2cf9ad5752c4a5949409fd7fad986552d1bc6a99 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 18 Aug 2008 09:42:17 +0000 Subject: 2008-08-18 Roland McGrath * 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). --- configure.in | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'configure.in') 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 -- cgit v1.1