Was smbase and ast configured and builded before elkhound?
Yep.
I think errors you have is related to missing stuff, not a bad compiler.
Could you please post the entire build log of gcc? Or, what'd be even better, maybe you could crosscompile it with "-march=core2 -m64"?