libtool
[Top][All Lists]
Advanced

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

inherited_flags.at failure on HP-UX 10.20


From: Albert Chin
Subject: inherited_flags.at failure on HP-UX 10.20
Date: Thu, 18 May 2006 02:40:21 -0500
User-agent: Mutt/1.5.6i

HP-UX 10.20 uses ld rather than cc to create shared libraries. Because
of this, inherited_linker_flags in a *.la file is not added to the
link line.

>From ltmain.sh:
        if test "$linkmode,$pass" = "prog,link"; then
          compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
          finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
        else
          compiler_flags="$compiler_flags $inherited_linker_flags"
        fi

$inherited_linker_flags is added to $compiler_flags but
$compiler_flags is used only when cc is used to create a shared
library. From libtool.m4:
    hpux10*)
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname 
${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
      else
        _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o 
$lib $libobjs $deplibs $linker_flags'
      fi

So, should we modify the code in ltmain.sh to add
$inherited_linker_flags to $linker_flags:
        if test "$linkmode,$pass" = "prog,link"; then
          compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
          finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
        else
          compiler_flags="$compiler_flags $inherited_linker_flags"
          linker_flags="$linker_flags $inherited_linker_flags"
        fi

Looking at what is added to $new_inherited_linker_flags in ltmain.sh,
this looks safe.

-- 
albert chin (address@hidden)




reply via email to

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