add --with-arch to give more control over which architecture gcc compiles

for. this is espeically useful when (eg) config.guess provies the arch as
i686 but a i586 is more correct.
This commit is contained in:
Bill Currie 2002-04-10 18:22:46 +00:00
parent d2954ce4d0
commit ba1da79bd6
1 changed files with 23 additions and 8 deletions

View File

@ -1229,16 +1229,31 @@ if test "x$optimize" = xyes; then
CFLAGS="$CFLAGS $heavy"
fi
AC_MSG_CHECKING(for special compiler settings)
case "${host_cpu}" in
i?86)
if test "x$HAVE_AMD" = "xyes"; then
MORE_CFLAGS="-march=k6"
else
MORE_CFLAGS="-march=${host_cpu}"
fi
AC_ARG_WITH(arch,
[ --with-arch=ARCH control compiler architecture directly],
arch="$withval", arch=auto
)
echo -n $arch
case "$arch" in
auto)
case "${host_cpu}" in
i?86)
if test "x$HAVE_AMD" = "xyes"; then
MORE_CFLAGS="-march=k6"
else
MORE_CFLAGS="-march=${host_cpu}"
fi
;;
*)
MORE_CFLAGS=""
;;
esac
;;
no|"")
MORE_CFLAGS=""
;;
*)
MORE_CFLAGS=""
MORE_CFLAGS="-march=$arch"
;;
esac
if test "x$MORE_CFLAGS" = x; then