[gcc] Make command line for static linking similar to what native gcc does

The problem is that libgcc_eh depends on libc and libc depends on libgcc_eh.

For x86_64, everything works as is as all libc dependencies are inlined in libgcc_eh. For x86, there is memcpy call that is not inlined, and our current link specs do not work.

Anyway, counting on all libc stuff being inlined is bad. Native gcc does not do that, and uses --start-group/--end-group to resolve these dependencies.

This change makes our link specs similar to what native gcc has.

BUG=http://code.google.com/p/nativeclient/issues/detail?id=1298
TEST=no more additional -lc for static linking by x86 glibc toolchain

Review URL: http://codereview.chromium.org/6711037
1 file changed