On Mon, Oct 17, 2011 at 10:05 PM, Perry Smith <pedz...@gmail.com> wrote:

> dump -H libstdc++.so.6
>
> ./powerpc-ibm-aix6.1.0.0/libstdc++-v3/src/.libs/libstdc++.so.6.orig:
>
>                        ***Loader Section***
>                      Loader Header Information
> VERSION#         #SYMtableENT     #RELOCent        LENidSTR
> 0x00000001       0x00000fe0       0x000033b6       0x000000da
>
> #IMPfilID        OFFidSTR         LENstrTBL        OFFstrTBL
> 0x00000003       0x0003e9a8       0x0002dec7       0x0003ea82
>
>
>                        ***Import File Strings***
> INDEX  PATH                          BASE                MEMBER
> 0      
> /usr/work/build/gcc-4.5.2/powerpc-ibm-aix6.1.0.0/libstdc++-v3/src:/usr/work/build/gcc-4.5.2/powerpc-ibm-aix6.1.0.0/libstdc++-v3/src/.libs:/usr/work/build/gcc-4.5.2/./gcc:/usr/lib:/lib
> 1                                    libc.a              shr.o
> 2                                    libgcc_s.a          shr.o
>
> What this is telling us is that libstdc++.so.6 needs libc.a(shr.o) and
> libgcc_s.a(shr.o) and it is also telling us that when libc.a(shr.o)
> and libgcc_s.a(shr.o) is needed at run time, the list of places
> searched is the list of directories listed in entry 0.  But the list
> is the list of where the library is built -- not where it (or more
> importantly where libgcc_s.a) will be installed.  When I configured
> and built this gcc, prefix path was set to
> /gsa/ausgsa/projects/r/ruby.
>
> Here are the first few lines of my config.log:
>
>  /usr/work/src/gcc-4.5.2/configure --prefix=/gsa/ausgsa/projects/r/ruby 
> --with-gmp=/gsa/ausgsa/projects/r/ruby 
> --with-mpfr=/gsa/ausgsa/projects/r/ruby 
> --with-mpc=/gsa/ausgsa/projects/r/ruby --disable-nls --enable-threads=aix 
> --with-libiconv-prefix=/usr --enable-languages=c,c++

AIX inserts the list of libraries provided with -L options on the link
command line into the default search path.  If you want, you can edit
libtool created for libstdc++ to add
-Wl,-blibpath:/gsa/ausgsa/projects/r/ruby/lib:/usr/lib:/lib and relink
libstdc++ (or edit the path in the shared object header directly).

- David

Reply via email to