hooking a new intrinsic subroutine?
Paul Brook
paul@codesourcery.com
Sun Apr 18 21:11:00 GMT 2004
On Sunday 18 April 2004 20:46, Steve Kargl wrote:
> On Sun, Apr 18, 2004 at 08:34:30PM +0100, Paul Brook wrote:
> > On Sunday 18 April 2004 20:26, Steve Kargl wrote:
> > > > System_clock should already work properly (actually it's &rate, bit I
> > > > assume that's a typo). Use -fdump-tree-original to see exactly what
> > > > is being generated.
> > >
> > > kargl[205] gfortran -static system_clock.f90
> > > /var/tmp/cch50HhN.o: In function `MAIN__':
> > > /var/tmp/cch50HhN.o(.text+0x16): undefined reference to
> > > `_gfortran_system_clock' /var/tmp/cch50HhN.o(.text+0x15c): undefined
> > > reference to `_gfortran_system_clock' /var/tmp/cch50HhN.o(.text+0x24b):
> > > undefined reference to `_gfortran_system_clock' collect2: ld returned 1
> > > exit status
> >
> > Ah, I menant the compiler side, not the library side!
>
> I have a first crack at a library routine. My original question
> was how do I hook up my library routine to libgfortran? Obviously,
> I was not clear. My routine is in libgfortran/intrinsics/system_clock.c.
> I modified libgfortran/Makefile.am, but am stuck at this point.
> My attempt at autoconf/automake cause unwanted damaged to my gcc tree.
It sounds like all you need to do is run automake in libgfortran/ to
regererate libgfortran/Makefile.in. You'll probably need to start with a
clean build tree after changing the configury system.
Different bits of gcc need different autotools versions. libgrfortran uses
autoconf 2.59 and automake 1.8. Using older versions, or attempting to use
these versions in the toplevel gcc directory will break things.
This is all a bit of a mess because gcc is still undergoing the painful
transition from autoconf 2.13 to autoconf 2.5x.
Paul
More information about the Fortran
mailing list