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 <macro@linux-mips.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
bitmap-optimize
Maciej W. Rozycki 2008-05-21 00:38:12 +01:00 committed by Theodore Ts'o
parent 492ea6556e
commit b8251a546d
2 changed files with 0 additions and 17 deletions

9
configure vendored
View File

@ -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

View File

@ -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)