This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] extend libSystem symlink pruning


  The attached patch extends the symlinks to libSystem that are
pruned in config/darwin.h's LINK_SPEC. Remove-outfile is only used
to remove -lc when !nodefaultlibs. The remaing instances of -ldbm,
-linfo, -lpoll, -lproc and -lrpcsvc are removed unconditionally.
Bootstrapped and regression tested on x86_64-apple-darwin10. Okay
for gcc trunk?
           Jack
ps I've omitted the remaining libgcc_s.1.dylib symlink on 10.6
and later (which is present due to libgcc being subsumed into
libSystem) because it is unclear how this can be done conditionally.

2010-08-17  Jack Howarth <howarth@bromo.med.uc.edu>

	* config/darwin.h (LINK_SPEC): Add remove -lc, conditional
	on !nodefaultlibs, -ldbm, -linfo, -lpoll, -lproc and -lrpcsvc.


Index: gcc/config/darwin.h
===================================================================
--- gcc/config/darwin.h	(revision 163323)
+++ gcc/config/darwin.h	(working copy)
@@ -303,9 +303,15 @@
    so put a * after their names so all of them get passed.  */
 #define LINK_SPEC  \
   "%{static}%{!static:-dynamic} \
+   %{!nodefaultlibs: %:remove-outfile(-lc) } \
+   %:remove-outfile(-ldbm) \
    %:remove-outfile(-ldl) \
+   %:remove-outfile(-linfo) \
    %:remove-outfile(-lm) \
+   %:remove-outfile(-lpoll) \
+   %:remove-outfile(-lproc) \
    %:remove-outfile(-lpthread) \
+   %:remove-outfile(-lrpcsvc) \
    %{fgnu-runtime: %{static|static-libgcc: \
                      %:replace-outfile(-lobjc libobjc-gnu.a%s); \
                     :%:replace-outfile(-lobjc -lobjc-gnu ) } }\


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]