Patch to not link in libgfortranbegin.a when building ftn shared libs

Paolo Bonzini
Thu Mar 22 16:40:00 GMT 2007

Steve Ellcey wrote:
>> 2007-03-19  Steve Ellcey  <>
>>       * gfortranspec.c (lookup_option): Set use_init to 1 if -shared seen.
> I think I am going to drop this patch.  It doesn't fix the problem I am
> trying to address anyway.  After applying this patch and fixing some
> other libgfortran issues with the latest libtool I still fail to build
> libgfortran because when using the fortran driver to create libgfortran
> the link line winds up containing -lgfortran on it.  This fails because
> we haven't built libgfortran yet, that is what we are trying to do.  I
> think I need to change the libgfortran Makefile to use C or the linker
> to create libgfortran instead of using the fortran driver but I haven't
> figured out how to do that yet.

Try writing your own rule for that, using "$(LIBTOOL) --tag=CC" instead
of the fortran tag.


More information about the Gcc-patches mailing list