This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
update Darwin LINK_COMMAND_SPEC
- From: gkeating at apple dot com (Geoffrey Keating)
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 30 Mar 2006 15:46:07 -0800 (PST)
- Subject: update Darwin LINK_COMMAND_SPEC
This brings the Darwin LINK_COMMAND_SPEC into line with the gcc.c in
one respect: it lets STARTFILE_SPEC control what files get added even
for dynamic libraries. The Darwin STARTFILE_SPEC is
"%{!Zdynamiclib:%{Zbundle:%{!static:-lbundle1.o}} \
...
%{!preload:-lcrt1.o %(darwin_crt2)}}}}}} \
%{shared-libgcc:%:version-compare(< 10.5 mmacosx-version-min= crt3.o%s)}"
so this only has the effect of adding the new crt3.o to dynamic
libraries, which is of course essential for correctness.
Bootstrapped & tested (c++ only) on powerpc-darwin8.
--
- Geoffrey Keating <geoffk@apple.com>
===File ~/patches/gcc-darwin-4495520.patch==================
2006-03-30 Geoffrey Keating <geoffk@apple.com>
* config/darwin.h (LINK_COMMAND_SPEC): Don't try to protect %S with
!Zdynamiclib.
Index: config/darwin.h
===================================================================
--- config/darwin.h (revision 112548)
+++ config/darwin.h (working copy)
@@ -205,7 +205,7 @@
%l %X %{d} %{s} %{t} %{Z} \
%{!Zdynamiclib:%{A} %{e*} %{m} %{N} %{n} %{r} %{u*} %{x} %{z}} \
%{@:-o %f%u.out}%{!@:%{o*}%{!o:-o a.out}} \
- %{!Zdynamiclib:%{!A:%{!nostdlib:%{!nostartfiles:%S}}}} \
+ %{!A:%{!nostdlib:%{!nostartfiles:%S}}} \
%{L*} %{fopenmp:%:include(libgomp.spec)%(link_gomp)} \
%(link_libgcc) %o %{fprofile-arcs|fprofile-generate|coverage:-lgcov} \
%{!nostdlib:%{!nodefaultlibs:%(link_ssp) %G %L}} \
============================================================