How about the attached (untested) patch instead? It should fix the underlying problem, and thus avoid the need for fiddling with compiler flags.