From b8251a546d0922783b8d263c9f6887a288e55c07 Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Wed, 21 May 2008 00:38:12 +0100 Subject: [PATCH] Remove default sizeof sizes in configure script when cross-compiling Since version 2.50 autoconf fully supports checking sizes of types (with AC_CHECK_SIZEOF) when cross-compiling. Therefore there is no need to preset the respective cache variables anymore. The following patch removes the special case. There is no need to adjust AC_PREREQ as it's set to 2.50 already. Tested successfully cross-building for the mips64el-linux-gnu host on an i386-linux-gnu build system, removing the following warning (because of a mismatch for the "long" type): Sizeof(__U64__TYPEDEF) is 4 should be 8 Problem detected with asm_types.h Signed-off-by: Maciej W. Rozycki Signed-off-by: "Theodore Ts'o" --- configure | 9 --------- configure.in | 8 -------- 2 files changed, 17 deletions(-) diff --git a/configure b/configure index 13c55e1..635a94f 100755 --- a/configure +++ b/configure @@ -12576,15 +12576,6 @@ _ACEOF fi -if test "$cross_compiling" = yes -a "$ac_cv_sizeof_long" = ""; then - # if cross-compiling, with no cached values, just assume something common. - ac_cv_sizeof_short=2 - ac_cv_sizeof_int=4 - ac_cv_sizeof_long=4 - ac_cv_sizeof_long_long=8 - { echo "$as_me:$LINENO: WARNING: Cross-compiling, so cannot check type sizes; assuming short=2, int=4, long=4, long long=8" >&5 -echo "$as_me: WARNING: Cross-compiling, so cannot check type sizes; assuming short=2, int=4, long=4, long long=8" >&2;} -fi { echo "$as_me:$LINENO: checking for short" >&5 echo $ECHO_N "checking for short... $ECHO_C" >&6; } if test "${ac_cv_type_short+set}" = set; then diff --git a/configure.in b/configure.in index d057af5..0c97af5 100644 --- a/configure.in +++ b/configure.in @@ -683,14 +683,6 @@ AC_CHECK_DECL(lseek64,[AC_DEFINE(HAVE_LSEEK64_PROTOTYPE)],, dnl dnl Word sizes... dnl -if test "$cross_compiling" = yes -a "$ac_cv_sizeof_long" = ""; then - # if cross-compiling, with no cached values, just assume something common. - ac_cv_sizeof_short=2 - ac_cv_sizeof_int=4 - ac_cv_sizeof_long=4 - ac_cv_sizeof_long_long=8 - AC_MSG_WARN([Cross-compiling, so cannot check type sizes; assuming short=2, int=4, long=4, long long=8]) -fi AC_CHECK_SIZEOF(short) AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) -- 1.8.3.1