RFC POSIX Fortran Interface

Jerry DeLisle jvdelisle@verizon.net
Sun Oct 14 20:44:00 GMT 2007


Steve Kargl wrote:
> On Sun, Oct 14, 2007 at 12:02:25PM -0700, Jerry DeLisle wrote:
>> Attached is an initial start at implementing the POSIX fortran interface 
>> for gfortran.
>>
>> The attached implements the following:
>>
>> Subroutine: PXFCONST()
>> Functions: IPXFCONST(), PXFISCONST(), PXFLENTRIM()
>>
>> I would like to extend my appreciation to Walter Spector for giving some 
>> initial guidance on this.
>>
>> The code is usable as is.  My plan is to incorporate this into libgfortran 
>> for version 4.4 when the time comes.
>>
> 
> Hi Jerry,
> 
> I haven't read through the code in detail; however, I'm wondering
> what your plans are.  In particular, do you plan to add the PXF
> functions as gfortran intrinsic procedures?  That is, are you
> going to edit intrinsics.c to use the add_sym* routines, and 
> do the name mangling to add _gfortran_.

No, I do not want to mess with intrinsics.c
> 
> Personally, I'd rather have an independent libpxf (without the name
> mangling) and a -fPXF or -fposix or some such option.  Without -fPFX
> the libraries during link would remain as is.  With -fPFX, the 
> gfortran frontend would then add -lpxf before the -lgfortran linker
> option.  This would allow someone (perhaps, Walt) to use their
> own implementation of libpxf without worrying about whether gfortran
> screws with the namespace.
> 

Yes, I would like to have a separate library, libpxf would be great

Ideally, to me anyway, a user ought to be able to just have "use pxf_interface 
in their own code and have the compiler just do it without need for a compiler 
option (an intrinsic module).  Of course I am open to consensus of the team and 
I will probably need help with the configure stuff anyway.

> It also appears that it may be appropriate to split all nonstandard
> intrinsics out of libgfortran into libfunjunk, and simply treat these
> as EXTERNAL references.  This would reduce the whining about getarg
> and iargc and ...  Of course, this would then mean people would need
> to use the -ffun-junk option.

I was thinking about this as well.  I am concerned that libgfortran may get too 
big.  Of course people can always use -static and strip if they want.  This will 
be another item for the 4.4 planning.

Jerry



More information about the Fortran mailing list