This is the mail archive of the 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 <> 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/ does indeed check void * instead.
So here's the change I'm committing:

2012-03-27  Roland McGrath  <>

        * Set want64 on a 64-bit host regardless of
        * configure: Regenerated.

diff --git a/ld/ b/ld/
index 63936f2..a5df0fa 100644
--- a/ld/
+++ b/ld/
@@ -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/ does.
+if test x${want64} = xfalse; then
+  AC_CHECK_SIZEOF(void *)
+  if test "x${ac_cv_sizeof_void_p}" = "x8"; then
+    want64=true
+  fi
 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
   if test "$targ_alias" = "all"; then
@@ -322,12 +331,6 @@ TDIRS=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

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