libtool
[Top][All Lists]
Advanced

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

Re: Add hppa*64* support to libtool


From: ross . alexander
Subject: Re: Add hppa*64* support to libtool
Date: Thu, 17 Oct 2002 16:02:05 +0100

Dave,

I have removed the GNU ld cases from the C and C++ shared library building
code.  The +std isn't really necessary.  The concern was a user would pass
+compat in CC_OPTS or CC='cc +compat' and cause libtool to fall into a
heap.

Below are the various changes (not the whole file because the libtool
mailing
list will bounce it).  By the way, is the IA64 case IA64 or IA64*?

I haven't removed the -fPIC or +Z code.  I'm not sure that it is very
important.

Many thanks

Ross

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*)
    hardcode_into_libs=yes
    dynamic_linker="$host_os dld.so"
    shlibpath_var=LD_LIBRARY_PATH
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
    library_names_spec='${libname}${release}.so$versuffix ${libname}
${release}.so$major $libname.so'
    soname_spec='${libname}${release}.so$major'
    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
    ;;
  hppa*64*)
    hardcode_into_libs=yes
    dynamic_linker="$host_os dld.sl"
    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
    library_names_spec='${libname}${release}.sl$versuffix ${libname}
${release}.sl$major $libname.sl'
    soname_spec='${libname}${release}.sl$major'
    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
    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'
    sys_lib_search_path_spec="/lib /usr/lib /usr/ccs/lib"
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  esac
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
  postinstall_cmds='chmod 555 $lib'
  ;;

...

hpux10.20* | hpux11*)
  lt_cv_file_magic_cmd=/usr/bin/file
  case "$host_cpu" in
  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_test_file=/usr/lib/hpux32/libc.so
    ;;
  hppa*64*)
    lt_cv_deplibs_check_method='file_magic ELF-64 shared object file -
PA-RISC [[0-9]].[[0-9]]'
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
    ;;
  *)
    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_test_file=/usr/lib/libc.sl
    ;;
  esac
  ;;

...


  hpux10*|hpux11*)
    if test "$with_gnu_ld" = no; then
      case "$host_cpu" in
      ia64*|hppa*64*)
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
        _LT_AC_TAGVAR(hardcode_direct, $1)=no
        ;;
      *)
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
        _LT_AC_TAGVAR(hardcode_direct, $1)=yes
        ;;
      esac
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Search PATH for ELF but as
                                              # the default location of
                                              # the library for SOM.
    else
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-Wl,-rpath'
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
    fi
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no

    case $cc_basename in
      CC)
        # FIXME: insert proper C++ library support
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        ;;
      aCC)
        case "$host_cpu" in
        ia64*|hppa*64*)
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib
$linker_flags $libobjs $deplibs'
          ;;
        *)
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname
${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs
$postdep_objects $compiler_flags'
          ;;
        esac
        # Commands to make compiler produce verbose output that lists
        # what "hidden" libraries, object files and flags are used when
        # linking a shared library.
        #
        # There doesn't appear to be a way to prevent this compiler from
        # explicitly linking system object files so we need to strip them
        # from the output so that they don't get included in the library
        # dependencies.
        output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v
conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case
$z in conftest.$objext) list="$list $z";; *.$o
bjext);; *) list="$list $z";;esac; done; echo $list'
        ;;
      *)
        if test "$GXX" = yes; then
          if test "$with_gnu_ld" = no; then
            case "$host_cpu" in
            ia64|hppa*64*)
              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib
$linker_flags $libobjs $deplibs'
              ;;
            *)
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC
${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects
$libobjs $deplibs $postdep_objects
$compiler_flags'
            esac
          fi
        else
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
        fi
        ;;
    esac
    ;;


...


    hpux10* | hpux11*)
      if test "$GCC" = yes; then
        case "$host_cpu" in
        ia64|hppa*64*)
          if test "$with_gnu_ld" = "no"; then
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h
${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
          fi
          ;;
        *)
           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b
$install_libdir -o $lib $libobjs $deplibs $linker_flags'
          ;;
        esac
      else
        case "$host_cpu" in
        ia64|hppa*64*)
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib
$libobjs $deplibs $linker_flags'
          ;;
        *)
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b
$install_libdir -o $lib $libobjs $deplibs $linker_flags'
          ;;
        esac
      fi
      if test "$with_gnu_ld" = no; then
        case "$host_cpu" in
        ia64|hppa*64*)
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
          ;;
        *)
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b
${wl}$libdir'
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
          ;;
        esac
        _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Search PATH for ELF and
the
                                                # default location of the
                                                # library for SOM.
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
      else
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath
${wl}$libdir'
        _LT_AC_TAGVAR(hardcode_direct, $1)=no
        _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
      fi
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
      ;;


---------------------------------------------------------------------------------

Ross Alexander                           "We demand clearly defined
MIS - NEC Europe Limited            boundaries of uncertainty and
Work ph: +44 20 8752 3394         doubt."






reply via email to

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