[Discuss] fortran + gcc 4 [results]

pw p.willis at telus.net
Tue Nov 7 13:41:29 PST 2006


pw wrote:
> pw wrote:
>> Hello,
>>
>> Does anyone know if g77 works with gcc version 4?
>> The read me at the GNU mirror(s) says not to try anything
>> other than gcc 2.8 with the posted version g77-0.5.23.
>>
>> Alternately does g95 have any problems with g77 code?
>>
>> Does the 'g77' command map to 'g95' when g95 is installed?
>>
>> Thanks for any info,
>>
>>
>> Peter
>>
> 
> 
> Hello,
> 
> Looking at the GCC canonical download site, gcc 4.1.1
> (my current version) shows gcc-fortran-4.1.1 .
> This is fortran 95/2003 for gcc.
> 
> I assume this is what I am *supposed* to install
> for my version of GCC.
> 
> Does anyone know if this also maps to g77?
> 
> The reason I ask is, I am installing some older software that uses g77
> as part of its core. The scripts provided are peppered with g77 (f77)
> references.
> 
> Thanks,
> 
> Peter
> 



I installed the RPM of gfortran that matched my gcc build and
linux distribution. I was tempted to use tarballs and just totaly
rebuild gcc but I didn't want to break the current system.
It's not like I'm running debian where tarballs tend to be the more
reliable install. Of course the last time I used debian was 1999...
I digress.

After checking the documentation regarding the command line options
for gfortran vs. g77 I found that there was little difference. Some
additional flags have been added to allow strict formatting of code
as opposed to the fortran95 'free style' coding.

As an experiment i simply put a soft link in /usr/bin from
g77 to gfortran:

ln -s /usr/bin/gfortran  /usr/bin/g77

I then ran my legacy application build (HDFr4)

No complaints came from the build.

Now I just need bison and lex...(complains about yacc)

I'll post the results of a running test of the actual
library.


Peter



More information about the Discuss mailing list