This is a libtool installation issue.  The problem is libgcc_s isn't
a libtool library and we don't relink against the installed libgcc_s
when installing libraries such as libstdc++.sl.  As a result, we
have a default path for libgcc_s.sl pointing to the GCC build directory.

529 (hiauly1)dave> chatr libstdc++.sl
libstdc++.sl:
         shared library
         shared library dynamic path search:
             SHLIB_PATH     disabled  second
             embedded path  enabled   first  /opt/gnu/gcc/gcc-4.0.2/lib
         internal name:
             libstdc++.sl.6
         shared library list:
             dynamic   /usr/lib/libM.1
             dynamic   /xxx/gnu/gcc-3.3/objdir/gcc/libgcc_s.sl
             dynamic   /usr/lib/libc.1
         shared vtable support disabled
         static branch prediction disabled
         kernel assisted branch prediction enabled
         lazy swap allocation disabled
         text segment locking disabled
         data segment locking disabled
         third quadrant private data space disabled
         fourth quadrant private data space disabled
         data page size: 4K
         instruction page size: 4K

The important part is the dynamic path to libgcc_s:
/xxx/gnu/gcc-3.3/objdir/gcc/libgcc_s.sl.  This is the
absolete path for libgcc_s.sl in the build directory
rather than the install directory.

The HP dynamic loader has the unfortunate characteristic
of trying the default dynamic path before the embedded 
or SHLIB_PATH. If the build directory contains an incompatible
libgcc_s.sl (e.g., 64-bit build), the installation breaks.

HP-UX 11 ld has a '+nodefaultrpath' option which could fix
this, but it's not available on HP-UX 10.  So, it would be
better if libtool linked against the installed version of
libgcc_s.sl when installing other libraries which depend on
it.

This problem is present in all GCC versions.


-- 
           Summary: Default path for libgcc_s.sl is build directory
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: danglin at gcc dot gnu dot org
 GCC build triplet: hppa*-hp-hpux* (32-bit)
  GCC host triplet: hppa*-hp-hpux* (32-bit)
GCC target triplet: hppa*-hp-hpux* (32-bit)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26472

Reply via email to