DEFAULT_SUPP=""
-# We don't want gcc 2.7
+# We don't want gcc < 3.0
AC_MSG_CHECKING([for a supported version of gcc])
gcc_version=`${CC} --version | head -n 1`
case "${gcc_version}" in
gcc-2.7.*)
AC_MSG_RESULT([no (${gcc_version})])
- AC_MSG_ERROR([please use a recent (>= gcc-2.95) version of gcc])
+ AC_MSG_ERROR([please use a recent (>= gcc-3.0) version of gcc])
+ ;;
+ gcc-2.8.*)
+ AC_MSG_RESULT([no (${gcc_version})])
+ AC_MSG_ERROR([please use a recent (>= gcc-3.0) version of gcc])
+ ;;
+ gcc-2.9*)
+ AC_MSG_RESULT([no (${gcc_version})])
+ AC_MSG_ERROR([please use a recent (>= gcc-3.0) version of gcc])
;;
*)
AC_MSG_RESULT([ok (${host_cpu})])
VG_ARCH="x86"
KICKSTART_BASE="0xb0000000"
- ARCH_CORE_AM_CFLAGS="-m32 @PREFERRED_STACK_BOUNDARY@ -DELFSZ=32"
- ARCH_TOOL_AM_CFLAGS="-m32 @PREFERRED_STACK_BOUNDARY@"
- ARCH_CORE_AM_CCASFLAGS="-m32"
+ ARCH_CORE_AM_CFLAGS="@FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ -DELFSZ=32"
+ ARCH_TOOL_AM_CFLAGS="@FLAG_M32@ @PREFERRED_STACK_BOUNDARY@"
+ ARCH_CORE_AM_CCASFLAGS="@FLAG_M32@"
;;
x86_64)
;;
esac
+
# We don't know how to detect the X client library version
# (detecting the server version is easy, bu no help). So we
# just use a hack: always include the suppressions for both
fi
+# does this compiler support -m32 ?
+AC_MSG_CHECKING([if gcc accepts -m32])
+
+safe_CFLAGS=$CFLAGS
+CFLAGS="-m32"
+
+AC_TRY_COMPILE(, [
+int main () { return 0 ; }
+],
+[
+FLAG_M32="-m32"
+AC_MSG_RESULT([yes])
+], [
+FLAG_M32=""
+AC_MSG_RESULT([no])
+])
+CFLAGS=$safe_CFLAGS
+
+AC_SUBST(FLAG_M32)
+
+
# does this compiler support -mpreferred-stack-boundary=2 ?
AC_MSG_CHECKING([if gcc accepts -mpreferred-stack-boundary])
AC_SUBST(PREFERRED_STACK_BOUNDARY)
+
# does this compiler support -Wno-pointer-sign ?
AC_MSG_CHECKING([if gcc accepts -Wno-pointer-sign ])
CFLAGS="$CFLAGS -Wno-pointer-sign"
fi
+
# Check for TLS support in the compiler and linker
AC_CACHE_CHECK([for TLS support], vg_cv_tls,
[AC_ARG_ENABLE(tls, [ --enable-tls platform supports TLS],
AC_DEFINE([HAVE_TLS], 1, [can use __thread to define thread-local variables])
fi
+
# Check for PIE support in the compiler and linker
AC_SUBST(PIE_AM_CFLAGS)
AC_CACHE_CHECK([for PIE support], vg_cv_pie,
AC_HEADER_STDC
AC_CHECK_HEADERS([sys/endian.h endian.h mqueue.h])
+
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_UID_T
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
+
# Checks for library functions.
AC_FUNC_MEMCMP
AC_FUNC_MMAP