"-fno-rtti" might be needed.

Thanks to Jeroen Ketema for pointing this out.