I successfully built flac-1.1.2 from pkgsrc-current on a Solaris 10 system using gcc-3.3.5 and other tools from pkgsrc-current with CFLAGS=-O2 -mcpu ultrasparc -mvis
I'm surprised that Solaris 10 fixes this; everything else seems to be the same.
If you want to see a build log, look at: http://backyard.homeunix.net/~ben/docs/comp/unix/netbsd/pkgsrc/flac.txt
I tried to match your configure options as closely as possible (add gettext-lib/buildlink3.mk to get iconv detected, remove nasm on my system), to no avail.
What do you think of only disabling -mcpu=ultrasparc in the case of Solaris 9?
Works for me, although I wonder if something odd in my setup is actually the cause.
Simon