Or, if the program you're trying to build doesn't really use newer glibc features, you can avoid pulling the whole set of GLIBC_2.7 symbols related to the fortify & stack smashing features of newer glibc/gcc couples by putting
-fno-stack-protector -U_FORTIFY_SOURCE
in your CFLAGS.
That won't help you if your program actually *wants* to use newer glibc features (depending on the feature in question, it might be easy enough to hack around it).
readelf is your friend to check you're not pulling unwanted symbols

.
(I'm using a GCC 4.5/Glibc 2.9 TC to build stuff for the hacks, for example, and I have yet to run into more trouble than a silly hack in coreutils to avoid ABI mismatches).