I've seen things like this before where I had to add -O2 to get around things like "internal compiler error" when building gcc. Some versions of gcc seem to require being built with -O2. -O or no optimization sometimes does not work. I am sorry I cannot be more specific.