On Sun, Nov 28, 2010 at 12:39 PM, John R. Cary <c...@txcorp.com> wrote:
> On 11/28/10 10:25 AM, Ralf Wildenhues wrote:
>>
>> Hello John,
>>
>> * John R. Cary wrote on Sun, Nov 28, 2010 at 03:02:48PM CET:
>>>
>>> I am tring to link with libtool using the compiler
>>> wrappers on a Cray and with pgi.
>>>
>>> At final link, libtool inserts the flag, -pthread, which
>>> causes the compiler to fail.  This is shown below.
>>
>> Uh, that's probably because one of the installed libtool libraries you
>> link against was compiled with GCC and with -pthread, so it has that
>> flag in its inherited_linker_flags.  Easiest workaround would be to
>> remove that from the *.la file.
>>
>> And yes, this is a libtool bug.  It should translate -pthread to the
>> spelling that your compiler uses for enabling threads.
>>
>> Thanks for the report,
>> Ralf
>>
>
> Thanks, Ralf.  Unfortunately, I cannot apply your suggested fix,
> as the library is a system library.
>
> For now I have a workaround that I just drop back to the
> the non libtool way for linking C++ code that links in a fortran
> library.

The PGI compilers look for config files in your home directory. Try
adding this line

set NOSWITCHERROR=1;

to the following files

~/.mypgcpprc
~/.mypgf77rc
~/.mypgf90rc
~/.mypgfortranrc


Then, the compiler will just ignore switches it does not understand.

Chris
>
> Thx.....John
>
>
> _______________________________________________
> http://lists.gnu.org/mailman/listinfo/libtool
>

_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to