[patch, darwin] repost of a patch to make "-static-libgfortan" work.
Paolo Bonzini
bonzini@gnu.org
Wed Dec 31 10:52:00 GMT 2008
> I think the attached patch is the minimum [3 lines + comments] that can
> be done to achieve this... and much better than my original post.
I cannot approve it, but I think it is great that you managed to do this
with such a small patch!
> I had another look at this and my conclusions are:
> (a) find_file is not available in this context (static definition in
> gcc.c)
Ah ok. I didn't check that; it would have been okay, if needed, to make
it non-static.
> (b) the following works for gcc <> <> <> -lgfortranbegin -lgfortran
> as well as gfortran ...
>
> Index: gcc/config/darwin.h
> ===================================================================
> --- gcc/config/darwin.h (revision 142951)
> +++ gcc/config/darwin.h (working copy)
> @@ -258,6 +258,7 @@
> #define LINK_SPEC \
> "%{static}%{!static:-dynamic} \
> %{fgnu-runtime:%:replace-outfile(-lobjc -lobjc-gnu)}\
> + %{static|static-libgfortran:%:replace-outfile(-lgfortran
> libgfortran.a%s)}\
What about static libgomp? If it is also so easy, it's worth doing it
now (I was afraid it required getting rid of libgomp.spec.in).
Paolo
More information about the Fortran
mailing list