mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 18:01:15 +00:00
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:
parent
d2954ce4d0
commit
ba1da79bd6
1 changed files with 23 additions and 8 deletions
31
configure.ac
31
configure.ac
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue