The problem is that very large CFLAGS will cause either corruption or a double free on 4.6 (and probably newer) icu library builds.
This odd problem can be reproduced using these CFLAGS:
(The -D is used to force the bug).
As this is shown I can think of various cuases:
One of the options strings being so large causes a overflow then corruption
The option set string itselfs is triggering an overflow
The function to increase the CFLAGS buffer is not working properly.
Replying to (Comment 4 srl):
Can you post the commit please? I'd like to forward port and test it if possible
Use the review link in the upper right corner to see the changes.
Milestone 4.7.1 deleted