--- gforth/configure.in 2010/07/25 14:33:01 1.278 +++ gforth/configure.in 2010/09/15 18:28:23 1.284 @@ -20,7 +20,7 @@ dnl Process this file with autoconf to p dnl We use some automake macros here, dnl but don't use automake for creating Makefile.in -AC_INIT([gforth],[0.7.0-20100725],[https://savannah.gnu.org/bugs/?func=addbug&group=gforth]) +AC_INIT([gforth],[0.7.0-20100915],[https://savannah.gnu.org/bugs/?func=addbug&group=gforth]) AC_PREREQ(2.54) #snapshots have numbers major.minor.release-YYYYMMDD #note that lexicographic ordering must be heeded. @@ -242,14 +242,20 @@ case "$host_cpu" in ;; i486) machine=386 - CFLAGS="$CFLAGS -fomit-frame-pointer -fforce-addr -m486" + CFLAGS="$CFLAGS -fomit-frame-pointer -fforce-addr" + CFLAGS_1="$CFLAGS" + CFLAGS="$CFLAGS -march=i486" + AC_TRY_COMPILE(,,,CFLAGS="$CFLAGS_1 -m486") + AC_TRY_COMPILE(,,,CFLAGS="$CFLAGS_1") ;; i*86) machine=386 CFLAGS="$CFLAGS -fomit-frame-pointer -fforce-addr" CFLAGS_1="$CFLAGS" - CFLAGS="$CFLAGS -march=pentium" + CFLAGS="$CFLAGS -march=pentium -mtune=generic" + AC_TRY_COMPILE(,,,CFLAGS="$CFLAGS_1 -march=pentium") AC_TRY_COMPILE(,,,CFLAGS="$CFLAGS_1 -m486") + AC_TRY_COMPILE(,,,CFLAGS="$CFLAGS_1") ;; x86_64) case $CC @@ -282,6 +288,7 @@ case "$host_cpu" in ;; mips*) machine=mips + AC_LIBOBJ(../arch/mips/check_prim) #dynamic native code has the following problems on MIPS: # #1) J/JAL seems relocatable, but is are only @@ -807,7 +814,11 @@ fi #echo "CFLAGS=$CFLAGS" #echo "ac_link=$ac_link" AC_MSG_CHECKING([if and how we can waste code space]) -if test -z "$skipcode"; then +if test -z "$skipcode" && test x$cross_compiling = xyes; then + # we cannot perform the AC_TRY_RUN check when cross-compiling. + skipcode=no + AC_MSG_RESULT([$skipcode, can't run checks since cross-compiling]) +elif test -z "$skipcode"; then skipcode=no CFLAGS_1="$CFLAGS" CFLAGS="$CFLAGS $ENGINE_FLAGS" @@ -845,7 +856,7 @@ then no_dynamic_default=1 AC_MSG_WARN(Disabling default dynamic native code generation) fi - AC_DEFINE_UNQUOTED(SKIP16,((void)0),statement for skipping 16 bytes) + AC_DEFINE_UNQUOTED(SKIP16,asm(""),statement for skipping 16 bytes) else AC_DEFINE_UNQUOTED(SKIP16,asm("$skipcode"),statement for skipping 16 bytes) fi