libtool-patches
[Top][All Lists]
Advanced

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

Re: Patches for libtool support on NAG Fortran compiler for Darwin OS


From: Jürgen Reuter
Subject: Re: Patches for libtool support on NAG Fortran compiler for Darwin OS
Date: Tue, 1 Mar 2011 18:45:30 +0100

On 1 Mar 2011, at 16:11, Peter O'Gorman wrote:

> On 03/01/2011 05:24 AM, Jürgen Reuter wrote:
>> Dear libtool team (cc to Peter)
>> as discussed with Peter I send to you a diff (compared to the
>> 2.4 official version of libtool) to support the NAG Fortran compiler
>> on Darwin 64bit machines.
> 
> 
> Thanks for your work on this.
> 
>>    case $cc_basename in
>> -     ifort*) _lt_dar_can_shared=yes ;;
>> +     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
>>       *) _lt_dar_can_shared=$GCC ;;
> 
> This hunk is OK.

Cool.

> 
>> @@ -4245,6 +4245,19 @@
>>        fi
>>        ;;
>> 
>> +     darwin* | rhapsody*)
>> +       # PIC is the default on this platform
>> +       # Common symbols not allowed in MH_DYLIB files
>> +       case $cc_basename in
>> +       nagfor*)
>> +       # NAG Fortran compiler
>> +       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
>> +       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
>> +       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
>> +       ;;
>> +       esac
>> +       ;;
>> +
> 

Attachment: test-suite.log
Description: Binary data

> This one isn't. Either this matches and then the default case that sets 
> lt_prog_compiler_pic to -fno-common later does not match, or vice versa. I 
> haven't looked at where this comes in libtool.m4. Something like this would 
> keep the default case working too:
> 
> @@ -4234,6 +4234,14 @@ m4_if([$1], [CXX], [
>       # PIC is the default on this platform
>       # Common symbols not allowed in MH_DYLIB files
>       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
> +      case $cc_basename in
> +      nagfor*)
> +     # NAG Fortran compiler
> +     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
> +     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
> +     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
> +     ;;
> +      esac
>       ;;
> 
>     haiku*)
> 
> Though, recent Mac OS X does not require -fno-common, because -single_module 
> is the default, it's mostly harmless to keep it there IMO.

OK, you are right Peter, I added the missing additional line, everything works 
fine with it,
so please take your version.


> 
>> diff -u ltmain.sh ../nag_trunk/ltmain.sh
>> --- ltmain.sh   2011-03-01 12:18:13.000000000 +0100
>> +++ ../nag_trunk/ltmain.sh      2011-03-01 11:49:34.000000000 +0100
>> @@ -7390,7 +7390,15 @@
>>           func_arith $current + 1
>>           minor_current=$func_arith_result
>>           xlcverstring="${wl}-compatibility_version ${wl}$minor_current 
>> ${wl}-current_version ${wl}$minor_current.$revision"
>> -         verstring="-compatibility_version $minor_current -current_version 
>> $minor_current.$revision"
>> +         # On Darwin other compilers
>> +         case $CC in
>> +             nagfor*)
>> +                 verstring="${wl}-compatibility_version ${wl}$minor_current 
>> ${wl}-current_version ${wl}$minor_current.$revision"
>> +                 ;;
>> +             *)
>> +                  verstring="-compatibility_version $minor_current 
>> -current_version $minor_current.$revision"
>> +                 ;;
>> +          esac
>>           ;;
> 
> I am a little confused by this because it seems strange that 
> -compatibility_version and -current_version would need -Wl, quoting, but 
> -dynamiclib, -bundle etc. do not. Did you happen to run the libtool test 
> suite with this patch? Please do so and post the results.
> 

This confuses me too. But somehow I was not able to wrap these options, it 
always gave error messages.
And somehow our program does work with this setup. I attached the 
test-suite.log for the modifications I 
made inside libtool, it looks good to me. But if you come up with a solution 
about how to wrap -dynamiclib
I am fine with this. In fact, the compiler warns me about
Option warning: Unrecognised option -dynamiclib passed to loader
Option warning: Unrecognised option -install_name passed to loader



> Thanks again, sorry for asking you to do more work,
> Peter


No problem, we are highly interested to keep our autotools versions 
synchronized with your repository.

Cheers,
        JRR



reply via email to

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