[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
Fixed thusly, applied to mainline.
[The 4.0 branch doesn't build with GCC 3.4pre because the test generated by
autoconf 2.13 for mmap is rejected by the compiler. We'll have to switch to
autoconf 2.5x there too.]
--
Eric Botcazou
Index: aclocal.m4
===================================================================
RCS file: /cvsroot/alleg/allegro/aclocal.m4,v
retrieving revision 1.56
diff -u -r1.56 aclocal.m4
--- aclocal.m4 28 Feb 2004 04:20:59 -0000 1.56
+++ aclocal.m4 28 Feb 2004 13:22:43 -0000
@@ -647,7 +647,7 @@
dnl Variables:
dnl allegro_cv_support_cplusplus=(yes|no)
dnl
-AC_DEFUN(ALLEGRO_ACTEST_CXX,
+AC_DEFUN(ALLEGRO_ACTEST_GCC_CXX,
[AC_MSG_CHECKING(whether a C++ compiler is installed)
AC_CACHE_VAL(allegro_cv_support_cplusplus,
[if test $GCC = yes; then
@@ -660,3 +660,23 @@
fi
])
AC_MSG_RESULT($allegro_cv_support_cplusplus)])
+
+dnl
+dnl Test for working '-mtune' i386 compile option.
+dnl
+dnl Variables:
+dnl allegro_cv_support_i386_mtune=(yes|no)
+dnl
+AC_DEFUN(ALLEGRO_ACTEST_GCC_I386_MTUNE,
+[AC_MSG_CHECKING(whether -mtune is supported)
+allegro_save_CFLAGS="$CFLAGS"
+CFLAGS="-mtune=i386"
+AC_CACHE_VAL(allegro_cv_support_i386_mtune,
+[if test $GCC = yes; then
+ AC_TRY_COMPILE(,int foo(){return 0;}, allegro_cv_support_i386_mtune=yes, allegro_cv_support_i386_mtune=no)
+else
+ allegro_cv_support_i386_mtune=no
+fi
+])
+CFLAGS="$allegro_save_CFLAGS"
+AC_MSG_RESULT($allegro_cv_support_i386_mtune)])
Index: configure.in
===================================================================
RCS file: /cvsroot/alleg/allegro/configure.in,v
retrieving revision 1.71
diff -u -r1.71 configure.in
--- configure.in 19 Jan 2004 17:30:54 -0000 1.71
+++ configure.in 28 Feb 2004 13:22:43 -0000
@@ -121,7 +121,7 @@
ALLEGRO_ACTEST_GCC_INCLUDE_PREFIX
ALLEGRO_ACTEST_GCC_PIPE
AC_PROG_CPP
-ALLEGRO_ACTEST_CXX
+ALLEGRO_ACTEST_GCC_CXX
ALLEGRO_ACTEST_PROG_LD_S
AC_PROG_INSTALL
AC_PROG_MAKE_SET
@@ -139,6 +139,11 @@
dnl Test for processor type.
ALLEGRO_ACTEST_PROCESSOR_TYPE
+dnl Test for -mtune i386 option
+if test "X$allegro_cv_processor_type" = "Xi386"; then
+ ALLEGRO_ACTEST_GCC_I386_MTUNE
+fi
+
dnl Test for asm support.
if test "X$allegro_enable_asm" = "Xyes"; then
if test "X$allegro_cv_processor_type" = "Xi386"; then
@@ -624,6 +629,8 @@
if test "X$allegro_cv_processor_type" = "Xi386"; then
if test "$allegro_exclusive_optimizations" != none; then
TARGET_ARCH="-march=$allegro_exclusive_optimizations"
+ elif test "X$allegro_cv_support_i386_mtune" = "Xyes"; then
+ TARGET_ARCH="-mtune=$allegro_optimizations"
else
TARGET_ARCH="-mcpu=$allegro_optimizations"
fi