This issue has been variously reported for some months. gcc hangs, consumes 100% and never finishes the compilation. It always seems to get stuck on the traits.cpp file.
We can't sort out gcc but we can significantly reduce the size of this file by factorising the repeating group traits. This would reduce the size of the file by 95%.
See this issue