In https://sourceware.org/bugzilla/show_bug.cgi?id=16428 there are three patches. I have tested them separately. Each of them fix the problem of configure hanging. However, the answer to the configure check: checking if gcc -std=gnu99 static flag -static works is yes when I use the first or the second patch, it is no (as on 64-bit) when I use the third patch.