See http://gnats.netbsd.org/41496 for details.
Donal K. Fellows
Works for me on Sol9, but I've got a completely different version of gcc on that system (and no hope of changing it).
This looks like a local configuration of gcc issue. Set CFLAGS before configure will get picked up too.
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).