Index: config/darwin.h
===================================================================
--- config/darwin.h	(revision 163460)
+++ config/darwin.h	(working copy)
@@ -301,11 +301,8 @@
    'Z' and 'no' prefixes). Note that options taking arguments may appear
    multiple times on a command line with different arguments each time,
    so put a * after their names so all of them get passed.  */
-#define LINK_SPEC  \
+#define CORE_LINK_SPEC  \
   "%{static}%{!static:-dynamic} \
-   %:remove-outfile(-ldl) \
-   %:remove-outfile(-lm) \
-   %:remove-outfile(-lpthread) \
    %{fgnu-runtime: %{static|static-libgcc: \
                      %:replace-outfile(-lobjc libobjc-gnu.a%s); \
                     :%:replace-outfile(-lobjc -lobjc-gnu ) } }\
@@ -386,6 +383,7 @@
    %{whatsloaded} %{dylinker_install_name*} \
    %{dylinker} %{Mach} "
 
+#define LINK_SPEC "CORE_LINK_SPEC"
 
 /* Machine dependent libraries.  */
 
Index: config/darwin9.h
===================================================================
--- config/darwin9.h	(revision 163460)
+++ config/darwin9.h	(working copy)
@@ -33,6 +33,20 @@
 /* libSystem contains unwind information for signal frames.  */
 #define DARWIN_LIBSYSTEM_HAS_UNWIND
 
+#undef LINK_SPEC
+#define LINK_SPEC \
+   "%{!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) \
+   CORE_LINK_SPEC"
+
+
 #undef  ASM_OUTPUT_ALIGNED_COMMON
 #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN)		\
   do {									\
