[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fort77(f2c wrapper) is not properly detected
From: |
Giulio Paci |
Subject: |
Re: fort77(f2c wrapper) is not properly detected |
Date: |
Sun, 30 Jan 2011 01:43:21 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101226 Icedove/3.0.11 |
Il 07/12/2010 01:43, Giulio Paci ha scritto:
> Il 05/12/2010 22:19, Ralf Wildenhues ha scritto:
>
>> Hello Giulio,
>>
>> * Giulio Paci wrote on Wed, Dec 01, 2010 at 03:02:05PM CET:
>>
>>
>>> Here is a patch to fix the issue in fortran.m4.
>>> I hope you'll find it useful.
>>>
>>>
>> Thanks for the patch. I have a nit, see the inline comment below.
>>
>> Can you run the Autoconf test suite with and without this patch applied?
>> Like this:
>> env F77=fort77 make check
>>
>> There should be a decrease in failed tests.
>>
>>
> Output changes from:
>
> Fortran low level compiling/preprocessing macros.
>
> 303: GNU Fortran 77 FAILED (fortran.at:31)
> 304: GNU Fortran ok
> 305: AC_OPENMP and Fortran 77 skipped
> (fortran.at:112)
> 306: AC_OPENMP and Fortran ok
> 307: AC_F77_DUMMY_MAIN usage FAILED (fortran.at:242)
> 308: AC_FC_DUMMY_MAIN usage ok
> 309: AC_F77_MAIN usage FAILED (fortran.at:402)
> 310: AC_FC_MAIN usage ok
> 311: AC_F77_FUNC usage FAILED (fortran.at:561)
> 312: AC_FC_FUNC usage ok
> 313: AC_FC_SRCEXT usage ok
> 314: AC_FC_FREEFORM ok
> 315: AC_FC_FREEFORM with AC_FC_SRCEXT ok
> 316: AC_FC_FIXEDFORM ok
> 317: AC_FC_FIXEDFORM with AC_FC_SRCEXT ok
> 318: AC_FC_LINE_LENGTH ok
>
> Testing autoconf/fortran macros.
>
> 319: AC_F77_MAIN FAILED
> (acfortran.at:13)
> 320: AC_F77_WRAPPERS FAILED
> (acfortran.at:14)
> 321: AC_FC_FIXEDFORM ok
> 322: AC_FC_FREEFORM ok
> 323: AC_FC_LINE_LENGTH ok
> 324: AC_FC_MAIN ok
> 325: AC_FC_WRAPPERS ok
> 326: AC_PROG_F77_C_O ok
> 327: AC_PROG_FC_C_O ok
> 328: AC_F77_NAME_MANGLING ok
> 329: AC_LANG_FORTRAN77 ok
>
> To:
>
> Fortran low level compiling/preprocessing macros.
>
> 303: GNU Fortran 77 FAILED (fortran.at:31)
> 304: GNU Fortran ok
> 305: AC_OPENMP and Fortran 77 skipped
> (fortran.at:112)
> 306: AC_OPENMP and Fortran ok
> 307: AC_F77_DUMMY_MAIN usage ok
> 308: AC_FC_DUMMY_MAIN usage ok
> 309: AC_F77_MAIN usage ok
> 310: AC_FC_MAIN usage ok
> 311: AC_F77_FUNC usage ok
> 312: AC_FC_FUNC usage ok
> 313: AC_FC_SRCEXT usage ok
> 314: AC_FC_FREEFORM ok
> 315: AC_FC_FREEFORM with AC_FC_SRCEXT ok
> 316: AC_FC_FIXEDFORM ok
> 317: AC_FC_FIXEDFORM with AC_FC_SRCEXT ok
> 318: AC_FC_LINE_LENGTH ok
>
> Testing autoconf/fortran macros.
>
> 319: AC_F77_MAIN ok
> 320: AC_F77_WRAPPERS ok
> 321: AC_FC_FIXEDFORM ok
> 322: AC_FC_FREEFORM ok
> 323: AC_FC_LINE_LENGTH ok
> 324: AC_FC_MAIN ok
> 325: AC_FC_WRAPPERS ok
> 326: AC_PROG_F77_C_O ok
> 327: AC_PROG_FC_C_O ok
> 328: AC_F77_NAME_MANGLING ok
> 329: AC_LANG_FORTRAN77 ok
>
>
>>> *** fortran.m4 2010-12-01 14:51:32.000000000 +0100
>>> --- fortran.m4 2010-12-01 14:40:29.000000000 +0100
>>> *************** case $ac_[]_AC_LANG_ABBREV[]_v_output in
>>> *** 541,546 ****
>>> --- 541,550 ----
>>> s/-ignore *'[[^']]*'/ /g; s/-ignore *\"[[^\"]]*\"/ /g
>>> s/-def *'[[^']]*'/ /g; s/-def *\"[[^\"]]*\"/ /g"` ;;
>>>
>>> + # If we are using fort77 (the f2c wrapper) then filter output and
>>> delete quotes.
>>> + *fort77*gcc*)
>>> + ac_[]_AC_LANG_ABBREV[]_v_output=`echo
>>> "$ac_[]_AC_LANG_ABBREV[]_v_output" | grep '"gcc"' | sed '/"-c"/d;
>>> s/^.*"gcc"/"gcc"/; s/"//g' ;;
>>>
>>>
>> What if the user builds in a directory name containing "gcc" or TMPDIR
>> contains that? Can we tighten the regex a bit? Also, 'grep | sed' is
>> often superflous grep and can be replaced with
>> sed -n '/regex/{
>> ...
>> }'
>>
>> but replacing semi-colons with newlines in the ... part.
>>
>>
> I tried to take care about your comments in this new patch. I avoided
> grep and made the regex more robust against the TMPDIR.
> The building directory is not a problem. If the TMPDIR contains '"gcc"'
> or a space, fort77 fails, so it should not be a problem either.
> With the attached patch we should have no problem with the TMPDIR (I am
> removing all the lines ending by '.c' or '.c"', that is where TMPDIR
> appears) even if fort77 get fixed. However I am not able to test it.
>
Any news?
Bests,
Giulio.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: fort77(f2c wrapper) is not properly detected,
Giulio Paci <=