libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] x86-64 and multilib


From: Jens Petersen
Subject: Re: [PATCH] x86-64 and multilib
Date: Mon, 05 Apr 2004 22:12:00 +0900
User-agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.4 (Hosorogi) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 MULE XEmacs/21.4 (patch 15) (Security Through Obscurity) (i386-redhat-linux)

[moved from libtool-patches to libtool]

Albert, Thank you for looking at the patch, and sorry for taking
too long to follow up to your comments.  (please see below)

> Index: libtool.m4
> ===================================================================
> RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
> retrieving revision 1.37
> diff -u -r1.37 libtool.m4
> --- libtool.m4        5 Feb 2004 14:53:16 -0000       1.37
> +++ libtool.m4        6 Feb 2004 03:33:01 -0000
> @@ -1853,6 +1853,26 @@
>    # Append ld.so.conf contents to the search path
>    if test -f /etc/ld.so.conf; then
>      lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' 
> /etc/ld.so.conf | tr '\n' ' '`
>      sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
>    fi
:
>    # people can always --disable-shared, the test was removed, and we
>    # assume the GNU/Linux dynamic linker is in use.
>    dynamic_linker='GNU/Linux ld.so'
> +
> +  # find out which ABI we are using
> +  libsuff=
> +  case "$host_cpu" in
> +    x86_64*|s390x*|powerpc64*)
> +      echo '[#]line __oline__ "configure"' > conftest.$ac_ext
> +      if AC_TRY_EVAL(ac_compile); then
> +        case `/usr/bin/file conftest.$ac_objext` in
> +          *64-bit*)
> +            libsuff=64
> +            ;;
> +        esac
> +      fi
> +      rm -rf conftest*
> +      ;;
> +    *)
> +      ;;
> +  esac
> +  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
> +  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} 
> /usr/local/lib${libsuff}"
>    ;;

>>>>> "AC" == Albert Chin <address@hidden> writes:

    AC> You reset sys_lib_dlsearch_path_spec.

    AC> So, do you want to add to sys_lib_dlsearch_path_spec?

    AC> Also, do you want to set sys_lib_search_path_spec,
    AC> sys_lib_dlsearch_path_spec for non x86_64 systems? 
    AC> The patch does this which, as far as I can see, is
    AC> not current behavior.

Good points.  (Fwiw I didn't make the patch...:)

Is the revised patch below any better?

-Jens


--- libtool-1.5.4/libtool.m4.multilib   2004-04-05 21:09:54.000000000 +0900
+++ libtool-1.5.4/libtool.m4    2004-04-05 22:00:20.000000000 +0900
@@ -1441,10 +1441,27 @@
   # before this can be enabled.
   hardcode_into_libs=yes
 
+  # find out which ABI we are using
+  libsuff=
+  case "$host_cpu" in
+  x86_64*|s390x*|powerpc64*)
+    echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+    if AC_TRY_EVAL(ac_compile); then
+      case `/usr/bin/file conftest.$ac_objext` in
+      *64-bit*)
+        libsuff=64
+        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} 
/usr/local/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=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' 
/etc/ld.so.conf | 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]