On Oct 23, 2011, at 1:59 PM, David Edelsohn wrote:

> On Sun, Oct 23, 2011 at 10:16 AM, Perry Smith <pedz...@gmail.com> wrote:
> 
>> libgomp.so.1 wants libc.a, libpthreads.a, and libgcc_s.a.  The first two do 
>> not present a problem.  But there are four libgcc_s.a (normal, ppc64, 
>> pthread, and ppc64+pthread).
>> 
>> Note that there is also four versions of libgomp.so.1 (normal, ppc64, 
>> pthread, ppc64+pthread).
>> 
>> My question is: which libgcc_s.a should I link to?  (this question is for 
>> each of the four versions of libgomp.so.1).
>> 
>> Setting LIBPATH or whatever I do is going to override the internal path 
>> (since the internal path is broken).  So, this may be a question that has 
>> never been asked or answered.
>> 
>> My knee jerk is that the normal libgomp.so.1 wants the normal libgcc_s.a, 
>> the ppc64 wants the ppc64, etc.  But I notice that it will always include 
>> pthread so that is what caused me to pause and ask.
>> 
>> Part of me wonders if the two non-pthread versions of libgomp make any 
>> sense.  I don't really know anything about libgomp.
> 
> libgomp (-fopenmp) does not make sense without pthreads.  -fopenmp
> implies pthreads.
> 
> One thing to note: AIX tools default to 32 bit mode, although all
> systems are 64 bit, unlike GNU/Linux, which defaults to 64 bit mode
> (on x86-64 and PPC64).
> 
> Only two of the four libgomp multilibs truly are necessary, but
> avoiding the non-pthread builds is not worth the trouble.  The
> non-pthread libgomp libraries never will be used, unless GCC is
> invoked incorrectly.  Each library, including libgomp, should list its
> multilib install directory first, e.g., ppc64 pthread would be
> 
> -Wl,-blibpath:.../lib/gcc/powerpc-ibm-aix6.1.3.0/4.6.0/pthread/ppc64:.../lib/pthread/ppc64:/usr/lib:/lib
> 
> and default would be
> 
> -Wl,-blibpath:.../lib/gcc/powerpc-ibm-aix6.1.3.0/4.6.0:.../lib:/usr/lib:/lib
> 
> The GCC build process and driver directory search process make a lot
> of assumptions that the system directories follow a Linux/SVR4/Solaris
> layout.  To follow AIX style, the PPC64 and PPC32 non-reentrant
> (non-pthreads) libraries should be archived into the same file
> libgomp.a (which never would be referenced) and the reentrant
> (pthreads) libraries for PPC64 and PPC32 should be archived into
> libgomp_r.a.  The benefit has not been shown to be worth the effort.

Thanks David,

One more question on this quest (drifting a little more off topic).

In my log files I see a lot of these errors:

> ld: 0711-768 WARNING: Object 
> ../libsupc++/.libs/libsupc++convenience.a[eh_terminate.o], section 1, 
> function .std::terminate():
>         The branch at address 0x10c is not followed by a recognized no-op
>         or TOC-reload instruction. The unrecognized instruction is 0x0.

The build continues and completes.  I just want to make sure that I can safely 
ignore them.  Surfing the web, sometimes I see people flag the as errors and 
other times not.

Thank you again,
pedz

Reply via email to