This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
bfd configure tweaks
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Tue, 16 Mar 2004 16:47:20 +1030
- Subject: bfd configure tweaks
This patch fixes some silliness in configure output, and tidies 64-bit
host type selection. We were getting
checking file_ptr type... checking size of off_t... 4
BFD_HOST_64_BIT
ie. the off_t size check was intruding between the file_ptr type message
and its result.
* configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
values selected in configure.host. Require both to be defined
before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
corresponding BFD_HOST vars with quotes.
<${host64}-${target64}-${want64} in *true*>: Don't exempt gcc.
Always require BFD_HOST_64_BIT_DEFINED.
<file_ptr type>: Find off_t size before emitting message. Combine
off_t and ftello64 conditional.
* configure: Regenerate.
Index: bfd/configure.in
===================================================================
RCS file: /cvs/src/src/bfd/configure.in,v
retrieving revision 1.146
diff -u -p -r1.146 configure.in
--- bfd/configure.in 15 Mar 2004 14:21:42 -0000 1.146
+++ bfd/configure.in 16 Mar 2004 05:17:42 -0000
@@ -132,20 +132,18 @@ fi
AC_COMPILE_CHECK_SIZEOF(long)
if test "x${ac_cv_sizeof_long}" = "x8"; then
host64=true
- HOST_64BIT_TYPE="long"
- HOST_U_64BIT_TYPE="unsigned long"
+ BFD_HOST_64BIT_LONG=1
+ test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long"
+ test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long"
elif test "x${ac_cv_sizeof_long_long}" = "x8"; then
- HOST_64BIT_TYPE="long long"
- HOST_U_64BIT_TYPE="unsigned long long"
+ test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long"
+ test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long"
fi
-if test "x${HOST_64BIT_TYPE}" = "xlong"; then
- BFD_HOST_64BIT_LONG=1
-fi
-if test "x${HOST_64BIT_TYPE}" != "x"; then
+if test -n "${HOST_64BIT_TYPE}" -a -n "${HOST_U_64BIT_TYPE}"; then
BFD_HOST_64_BIT_DEFINED=1
- BFD_HOST_64_BIT=${HOST_64BIT_TYPE}
- BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE}
+ BFD_HOST_64_BIT="${HOST_64BIT_TYPE}"
+ BFD_HOST_U_64_BIT="${HOST_U_64BIT_TYPE}"
fi
AC_SUBST(BFD_HOST_64BIT_LONG)
@@ -890,7 +888,7 @@ case ${host64}-${target64}-${want64} in
wordsize=64
bfd_libs='$(BFD64_LIBS) $(BFD32_LIBS)'
all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
- if test -z "$GCC" && test "$BFD_HOST_64BIT_LONG" = "0" && test "$BFD_HOST_64_BIT_DEFINED" = "0"; then
+ if test $BFD_HOST_64_BIT_DEFINED = 0; then
AC_MSG_WARN([You have requested a 64 bit BFD configuration, but])
AC_MSG_WARN([your compiler may not have a 64 bit integral type])
fi
@@ -927,17 +925,14 @@ AC_SUBST(bfd_default_target_size)
# Hopefully a reasonable assumption since fseeko et.al. should be
# upward compatible.
AC_CHECK_FUNCS(ftello ftello64 fseeko fseeko64)
-AC_MSG_CHECKING([file_ptr type])
-bfd_file_ptr="long"
-bfd_ufile_ptr="unsigned long"
if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then
AC_COMPILE_CHECK_SIZEOF(off_t)
- if test "x${ac_cv_sizeof_off_t}" = "x8"; then
- bfd_file_ptr=BFD_HOST_64_BIT
- bfd_ufile_ptr=BFD_HOST_U_64_BIT
- fi
fi
-if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes; then
+AC_MSG_CHECKING([file_ptr type])
+bfd_file_ptr="long"
+bfd_ufile_ptr="unsigned long"
+if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes \
+ -o x"${ac_cv_sizeof_off_t}" = x8; then
bfd_file_ptr=BFD_HOST_64_BIT
bfd_ufile_ptr=BFD_HOST_U_64_BIT
fi
--
Alan Modra
IBM OzLabs - Linux Technology Centre