http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50470
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-09-21 01:20:48 UTC --- I think this is why GCC created the --with-sysroot option while building GCC itself. And really -nostdlib is not just for "alternate library ecosystem". It is so you can supply all the libraries you want to link against explicitly. It is used to link glibc and other libc's tobegin with. Also if you list the full path to the library there is no search involved.