This affected me as well as I run Ubuntu Hardy Heron. This webpage
http://matrix108.wordpress.com/2007/11/28/arm-toolchain/ solved the problem though. I quote:
The Ubuntu shell is not bash by default! Instead it is linked to something called dash. Just make sure you relink /bin/sh to bash instead of dash. No idea when they did this, but I found that out after encountering this maddening error, pointing to some header files during the build:
missing terminating ” character.
I followed the above advice by making a symbolic link from /bin/sh -> /bin/sh.distrib and that error went away.