This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [F03] EXTENDS_TYPE_OF, CLASS IS and libgfortran


On Mon, 2009-11-02 at 23:45 +0100, Janus Weil wrote:
> However, since my experience with libgfortran is practically zero, I
> will need some help with this. What I would do is probably to add a
> new file 'extends_type_of.c' to libgfortran/intrinsics/, whose content
> could look something like this:

[...]


> Now, first technical question: How do I correctly tell the libgfortran
> Makefile to pick up this file, and add the function to the library?

You add the file to Makefile.am, probably to the gfor_helper_src
variable.  Then you build everything.

This regenerates Makefile.in by running autoconf automatically.  Make
sure (beforehand :-) that you have the correct version of autoconf, and
make sure to check Makefile.in against the SVN version to catch any
unpleasant surprises that may suddenly raise their ugly head.

Declare your function if you want it to be callable from the front end,
and use the export_proto macro on the declaration.  You can do that in
the file itself, unless you want to call it from somewhere else; then it
should go into libgfortran.h (and you should use iexport_proto).

Add your new global symbol to gfortran.map.

HTH,

	Thomas



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]