This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] ld: Set want64 on a 64-bit host regardless of --enable-all-targets


On Fri, Mar 23, 2012 at 1:24 AM, Kai Tietz <ktietz70@googlemail.com> wrote:
> Wouldn't it be better to check here instead of "long" for "void *"?
> So the change would also work for LLP64 targets.

I was just moving the existing check and didn't consider the merits of the
exact choice of check.  But the intent of my change is to make ld
consistent with bfd, and bfd/configure.in does indeed check void * instead.
So here's the change I'm committing:

ld/
2012-03-27  Roland McGrath  <mcgrathr@google.com>

        * configure.in: Set want64 on a 64-bit host regardless of
        --enable-targets=all.
        * configure: Regenerated.

diff --git a/ld/configure.in b/ld/configure.in
index 63936f2..a5df0fa 100644
--- a/ld/configure.in
+++ b/ld/configure.in
@@ -252,6 +252,15 @@ dnl not permit literal newlines in an AC_SUBST variables. \
 So we use a
 dnl file.
 rm -f tdirs

+# If the host is 64-bit, then we enable 64-bit targets by default.
+# This is consistent with what ../bfd/configure.in does.
+if test x${want64} = xfalse; then
+  AC_CHECK_SIZEOF(void *)
+  if test "x${ac_cv_sizeof_void_p}" = "x8"; then
+    want64=true
+  fi
+fi
+
 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
 do
   if test "$targ_alias" = "all"; then
@@ -322,12 +331,6 @@ TDIRS=tdirs
 AC_SUBST_FILE(TDIRS)

 if test x${all_targets} = xtrue; then
-  if test x${want64} = xfalse; then
-    AC_CHECK_SIZEOF(long)
-    if test "x${ac_cv_sizeof_long}" = "x8"; then
-      want64=true
-    fi
-  fi
   if test x${want64} = xtrue; then
     EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
   else


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]