This is the mail archive of the binutils@sources.redhat.com 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: libtool / GCC 3.2 question and patch


> Hmm...  Sorry, I have missed the need for that.  Might I perhaps ask
> you to prepare patches, one to be installed in the GCC repo, and one
> to be installed in s.r.c., so that they look the way you want,
> collecting the corresponding ChangeLog entries so as to give credit
> where it is due?

Here is the exact libtool patch I sent to binutils, I just applied it to
my local copy of the gcc libtool to make sure it worked and after
applying it it brought libtool.m4, ltcf-c.sh, and ltconfig into an exact
match with binutils.  ltcf-cxx.sh and ltcf-gcj.sh already match.

If you apply this patch to GCC the only difference between binutils and
GCC versions of libtool will be in ltmain.sh where Loren Rittle made a
change in the GCC version of ltmain.sh that is not reflected in the
binutils version.

Steve Ellcey
sje@cup.hp.com


2002-01-22  Steve Ellcey <sje@cup.hp.com>
        * libtool.m4 (HPUX_IA64_MODE): Set to 32 or 64 based on ABI.
        (lt_cv_deplibs_check_method, lt_cv_file_magic_cmd,
        lt_cv_file_magic_test_file): Set to appropriate values for HP-UX IA64.
        * ltcf-c.sh (archive_cmds, hardcode_*): Ditto.
        * ltconfig (shlibpath_*, dynamic_linker, library_names_spec,
        soname_spec, sys_lib_search_path_spec): Ditto.


*** src.orig/libtool.m4	Tue Jan 22 15:40:53 2002
--- src/libtool.m4	Tue Jan 22 15:40:28 2002
*************** case $host in
*** 159,164 ****
--- 159,180 ----
    rm -rf conftest*
    ;;
  
+ ia64-*-hpux*)
+   # Find out which ABI we are using.
+   echo 'int i;' > conftest.$ac_ext
+   if AC_TRY_EVAL(ac_compile); then
+     case "`/usr/bin/file conftest.o`" in
+     *ELF-32*)
+       HPUX_IA64_MODE="32"
+       ;;
+     *ELF-64*)
+       HPUX_IA64_MODE="64"
+       ;;
+     esac
+   fi
+   rm -rf conftest*
+   ;;
+ 
  *-*-sco3.2v5*)
    # On SCO OpenServer 5, we need -belf to get full-featured binaries.
    SAVE_CFLAGS="$CFLAGS"
*************** gnu*)
*** 568,576 ****
    ;;
  
  hpux10.20*|hpux11*)
!   lt_cv_deplibs_check_method=['file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
!   lt_cv_file_magic_cmd=/usr/bin/file
!   lt_cv_file_magic_test_file=/usr/lib/libc.sl
    ;;
  
  irix5* | irix6*)
--- 584,601 ----
    ;;
  
  hpux10.20*|hpux11*)
!   case $host_cpu in
!   hppa*)
!     [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
!     lt_cv_file_magic_cmd=/usr/bin/file
!     lt_cv_file_magic_test_file=/usr/lib/libc.sl
!     ;;
!   ia64*)
!     [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64']
!     lt_cv_file_magic_cmd=/usr/bin/file
!     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
!     ;;
!   esac
    ;;
  
  irix5* | irix6*)
*** src.orig/ltcf-c.sh	Tue Jan 22 15:41:03 2002
--- src/ltcf-c.sh	Tue Jan 22 15:40:39 2002
*************** else
*** 417,439 ****
      ;;
  
    hpux9* | hpux10* | hpux11*)
!     if test $with_gcc = yes; then
!       case "$host_os" in
!       hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
!       *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;;
!       esac
!     else
!       case $host_os in
!       hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
!       *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
!       esac
!     fi
!     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
!     hardcode_libdir_separator=:
!     hardcode_direct=yes
!     hardcode_minus_L=yes # Not in the search PATH, but as the default
! 			 # location of the library.
      export_dynamic_flag_spec='${wl}-E'
      ;;
  
    irix5* | irix6*)
--- 417,448 ----
      ;;
  
    hpux9* | hpux10* | hpux11*)
!     case "$host_cpu" in
!     ia64*)
!       hardcode_direct=no
!       hardcode_shlibpath_var=no
!       archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
!       hardcode_libdir_flag_spec='-L$libdir' ;;
!     *)
!       if test $with_gcc = yes; then
!         case "$host_os" in
!         hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
!         *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;;
!         esac
!       else
!         case $host_os in
!         hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
!         *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
!         esac
!       fi
!       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
!       hardcode_libdir_separator=:
!       hardcode_minus_L=yes # Not in the search PATH, but as the default
! 			   # location of the library.
!       ;;
!     esac
      export_dynamic_flag_spec='${wl}-E'
+     hardcode_direct=yes
      ;;
  
    irix5* | irix6*)
*** src.orig/ltconfig	Tue Jan 22 15:40:57 2002
--- src/ltconfig	Tue Jan 22 15:40:34 2002
*************** gnu*)
*** 1155,1168 ****
  hpux9* | hpux10* | hpux11*)
    # Give a soname corresponding to the major version so that dld.sl refuses to
    # link against other versions.
-   dynamic_linker="$host_os dld.sl"
    version_type=sunos
    need_lib_prefix=no
    need_version=no
!   shlibpath_var=SHLIB_PATH
!   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
!   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
!   soname_spec='${libname}${release}.sl$major'
    # HP-UX runs *really* slowly unless shared libraries are mode 555.
    postinstall_cmds='chmod 555 $lib'
    ;;
--- 1155,1186 ----
  hpux9* | hpux10* | hpux11*)
    # Give a soname corresponding to the major version so that dld.sl refuses to
    # link against other versions.
    version_type=sunos
    need_lib_prefix=no
    need_version=no
!   case "$host_cpu" in
!   ia64*)
!     dynamic_linker="$host_os dld.so"
!     shlibpath_var=LD_LIBRARY_PATH
!     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
!     soname_spec='${libname}${release}.so$major'
!     shlibpath_var=LD_LIBRARY_PATH
!     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
!     if test "X$HPUX_IA64_MODE" = X32; then
!       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32/usr/local/lib"
!     else
!       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
!     fi
!     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
!     ;;
!   *)
!     dynamic_linker="$host_os dld.sl"
!     shlibpath_var=SHLIB_PATH
!     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
!     library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
!     soname_spec='${libname}${release}.sl$major'
!     ;;
!   esac
    # HP-UX runs *really* slowly unless shared libraries are mode 555.
    postinstall_cmds='chmod 555 $lib'
    ;;


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