This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, darwin] repost of a patch to make "-static-libgfortan" work.
> 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