This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch, darwin] repost of a patch to make "-static-libgfortan" work.
- From: IainS <developer at sandoe-acoustics dot co dot uk>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Fortran List <fortran at gcc dot gnu dot org>, Mike Stump <mrs at apple dot com>
- Date: Tue, 23 Dec 2008 12:45:16 +0000
- Subject: [patch, darwin] repost of a patch to make "-static-libgfortan" work.
ref: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31400
Here is an updated repost of a patch I made back in the summer,
hopefully, this could be considered for 4.5
Darwin's linker doesn't support Bstatic/Bdynamic and defaults to the
shared version when shared and static libraries have the same basename.
Even if this is fixed sometime on darwin9 or later - it seems
improbable that such a fix would be extended to darwin8.
changes:
gcc/config/x-darwin: add a flag signalling that this host needs
distinct static library names.
gcc/fortran/gfortranspec.c: use a distinctly named libgfortran.a if
the host requires it for "-static-libgfortran"
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 - because ld64 doesn't like stabs
-- this is a general case, not related specifically to static
libgfortran).
Thanks to Ralf Wildenhues for help with the auto* changes.
cheers,
Iain
Attachment:
gfortran-change.diff
Description: Binary data
Attachment:
libgfortran-changed.diff
Description: Binary data
Attachment:
libgfortran-regenerated.diff
Description: Binary data