From: Julian Seward Date: Sat, 4 Jun 2005 23:14:53 +0000 (+0000) Subject: gcc-3.0.4 (x86) doesn't understand -m32, so autoconfiscate it X-Git-Tag: svn/VALGRIND_3_0_0~470 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e80d268f3b3f1dce37b397bb43e30652c769832;p=thirdparty%2Fvalgrind.git gcc-3.0.4 (x86) doesn't understand -m32, so autoconfiscate it git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3848 --- diff --git a/configure.in b/configure.in index 39650377b9..0aed2b8cac 100644 --- a/configure.in +++ b/configure.in @@ -62,7 +62,7 @@ AC_SUBST(ASFLAGS) 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` @@ -70,7 +70,15 @@ 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]) ;; *) @@ -96,9 +104,9 @@ case "${host_cpu}" in 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) @@ -268,6 +276,7 @@ case "${glibc}" in ;; 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 @@ -279,6 +288,27 @@ if test "${no_x}" != 'yes' ; then 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]) @@ -299,6 +329,7 @@ CFLAGS=$safe_CFLAGS AC_SUBST(PREFERRED_STACK_BOUNDARY) + # does this compiler support -Wno-pointer-sign ? AC_MSG_CHECKING([if gcc accepts -Wno-pointer-sign ]) @@ -321,6 +352,7 @@ if test x$no_pointer_sign = xyes; then 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], @@ -334,6 +366,7 @@ if test "$vg_cv_tls" = yes; then 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, @@ -360,12 +393,14 @@ AM_CONDITIONAL(USE_PIE, test "$vg_cv_pie" = "yes") 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