Restore simple LIB_SPEC using just -lc

The compiler configuration is not the place to encode internal details of
the libc implementation.  When the libc implementation wants the default
link to include multiple constituent libraries, it can do that by providing
a linker script for libc.so or libc.a and let the compiler just use -lc
as it has always done.

This follows a change to the nacl newlib build to provide a libc.a linker
script.  Future changes to the libc implementation internals will not
require any gcc change.

This also removes the truly evil magical treatment of -lnosys as a special
command line option.  It's just a library like any other.

BUG=cleanup
TEST=local builds still link the same using newlib's new libc.a linker script

R=khim@google.com,pasko@google.com,eaeltsin@google.com

Review URL: http://codereview.chromium.org/6995084
diff --git a/gcc/config/i386/nacl.h b/gcc/config/i386/nacl.h
index 8643f9e..7a7a321 100644
--- a/gcc/config/i386/nacl.h
+++ b/gcc/config/i386/nacl.h
@@ -91,16 +91,11 @@
   "%{Ym,*} %{Yd,*} %{Wa,*:%*} %{m32:--32} %{m64:--64} " \
   "%{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
 
-/* `crt_platform' contains low-level platform-specific intrinsics in C.  */
 #undef	LIB_SPEC
 #define LIB_SPEC \
   "%{pthread:-lpthread} \
-   %{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc} \
-   -lnacl \
-   %{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc} \
-   %{lnosys:-lnosys} \
-   -lcrt_platform \
-   %{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}"
+   %{shared:-lc} \
+   %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
 
 /* Define this so we can compile MS code for use with WINE.  */
 #define HANDLE_PRAGMA_PACK_PUSH_POP
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 5ef245e..55bc335 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -6806,10 +6806,7 @@
 
       /* Use the same thing in %o, unless cp->spec says otherwise.  */
 
-      if (strcmp(input_filename, "-lnosys") == 0)
-	outfiles[i] = NULL;
-      else
-	outfiles[i] = input_filename;
+      outfiles[i] = input_filename;
 
       /* Figure out which compiler from the file's suffix.  */