Blob Blame History Raw
diff -rup ../binutils-2.20.51.0.2.orig/bfd/configure bfd/configure
--- ../binutils-2.20.51.0.2.orig/bfd/configure	2009-10-12 11:45:05.000000000 +0100
+++ bfd/configure	2009-10-12 11:45:13.000000000 +0100
@@ -12694,11 +12694,13 @@ if test "x${ac_cv_sizeof_long}" = "x8"; 
   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
+fi
+if test "x${ac_cv_sizeof_long_long}" = "x8"; then
   BFD_HOST_64BIT_LONG_LONG=1
   test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long"
   test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long"
-  if test "x${ac_cv_sizeof_void_p}" = "x8"; then
+  if test "x${ac_cv_sizeof_void_p}" = "x8" \
+          -a "x${ac_cv_sizeof_long}" != "x8"; then
     BFD_HOSTPTR_T="unsigned long long"
   fi
 fi
diff -rup ../binutils-2.20.51.0.2.orig/bfd/configure.in bfd/configure.in
--- ../binutils-2.20.51.0.2.orig/bfd/configure.in	2009-10-12 11:45:05.000000000 +0100
+++ bfd/configure.in	2009-10-12 11:45:13.000000000 +0100
@@ -172,11 +172,13 @@ if test "x${ac_cv_sizeof_long}" = "x8"; 
   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
+fi
+if test "x${ac_cv_sizeof_long_long}" = "x8"; then
   BFD_HOST_64BIT_LONG_LONG=1
   test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long"
   test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long"
-  if test "x${ac_cv_sizeof_void_p}" = "x8"; then
+  if test "x${ac_cv_sizeof_void_p}" = "x8" \
+          -a "x${ac_cv_sizeof_long}" != "x8"; then
     BFD_HOSTPTR_T="unsigned long long"
   fi
 fi
diff -rup ../binutils-2.20.51.0.2.orig/bfd/configure.orig bfd/configure.orig
--- ../binutils-2.20.51.0.2.orig/bfd/configure.orig	2009-10-12 11:45:05.000000000 +0100
+++ bfd/configure.orig	2009-10-12 11:31:43.000000000 +0100
@@ -10670,10 +10670,34 @@ fi
   # before this can be enabled.
   hardcode_into_libs=yes
 
+   # find out which ABI we are using
+   libsuff=
+   case "$host_cpu" in
+   x86_64*|s390*|powerpc*|ppc*|sparc*)
+     echo 'int i;' > conftest.$ac_ext
+     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; then
+       case `/usr/bin/file conftest.$ac_objext` in
+       *64-bit*)
+         libsuff=64
+         if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
+           sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+         fi
+         sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
+         ;;
+       esac
+     fi
+     rm -rf conftest*
+     ;;
+   esac
+ 
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on