See bug #185747 comment #8: configure.in strips -g from CFLAGS and then readds it on the condition that --enable-debug is set. Which is stupid. Not only that, the ebuild uses USE=debug to merely enable -g, which is stupid too. :) Configure fails when -ggdb is in CFLAGS, because this is sed'd down to "gdb" which isn't something the compiler will readily accept as an argument.
Fixed in cvs without revision bump.