diff mbox

extend libSystem symlink pruning

Message ID 20100818102845.GA28918@bromo.med.uc.edu
State New
Headers show

Commit Message

Jack Howarth Aug. 18, 2010, 10:28 a.m. UTC
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.

Comments

Mike Stump Aug. 18, 2010, 5:17 p.m. UTC | #1
On Aug 18, 2010, at 3:28 AM, Jack Howarth wrote:
> Okay for gcc trunk?

Ok.
diff mbox

Patch

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 ) } }\