[patch, darwin] repost of a patch to make "-static-libgfortan" work.
IainS
developer@sandoe-acoustics.co.uk
Mon Dec 29 13:12:00 GMT 2008
On 23 Dec 2008, at 15:17, Paolo Bonzini wrote:
> I haven't looked at the patch, but...
>
>> gcc/config/x-darwin: add a flag signalling that this host needs
>> distinct static library names.
>
> This is a target-specific feature, not a host-specific feature. While
> Darwin is almost always bootstrapped, you can still see the
> difference:
> if I build a darwin-to-linux cross (build=host=darwin,
> target=linux) the
> linker *will* have working -Bstatic/-Bdynamic.
>
> You can put it in config/darwin.h.
actually, Paolo's comment led to a much simpler solution.
Ironically, the need to have different library names allows
substitution in the SPECs. So there is no need to modify code.
so the patch becomes one line in the spec:
gcc/config/darwin.h: substitute -lgfortran-static for -lgfortran
when '-static-libgfortran' or '-static' are in effect
and the necessary library re-naming:
libgfortran/Makefile.am : make separately named libgfortran-static.a
if the host is darwin, don't generate libgfortran.a
libgfortran/configure.ac: provide a flag on darwin systems that
require a separately named static library
libgfortran/Makefile.in regenerated
libgfortran/configure regenerated
regtested -m32/-m64 on i686-apple-darwin9
regtested -m32/-m64 on powerpc-apple-darwin8
(note, that to use this -m64 on darwin8, GCC must be built with
dwarf-2 as the default debug format).
cheers,
Iain
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: libgfortran-changed.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20081229/710458ef/attachment.txt>
-------------- next part --------------
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: libgfortran-regen.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20081229/710458ef/attachment-0001.txt>
-------------- next part --------------
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: static-libgfortran-replace.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20081229/710458ef/attachment-0002.txt>
-------------- next part --------------
More information about the Gcc-patches
mailing list