This patch cleans up the thread-model recognition code in all target libraries such that it obtains the thread information out of GCC, instead of having (and failing) to duplicate the logic used in gcc/configure.in. Tested on i686-pc-linux-gnu. Ok to install? Ok for 3.0 branch?