work on GCC 4.7 build and patches