Whamcloud - gitweb
Remove default sizeof sizes in configure script when cross-compiling
authorMaciej W. Rozycki <macro@linux-mips.org>
Tue, 20 May 2008 23:38:12 +0000 (00:38 +0100)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 21 May 2008 17:24:37 +0000 (13:24 -0400)
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>
configure
configure.in

index 13c55e1..635a94f 100755 (executable)
--- 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
index d057af5..0c97af5 100644 (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)