Upgrade gcc package

Hi,

The current version of gcc package is 5.4.0. It is old version and can't support mips-r6, so I want to upgrade it to 7.3.0 and support mips-r6. I upgraded it with old makefile and configure, checked patches just for mips, then compiled it. But code files in libgcc are not compiled, so "unwind_xxx" function can't be linked. There are some errors like this:
vterminate.cc:(.text._ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x1dc): undefined reference to `_Unwind_Resume'

Who can give me some help or suggestion?

Thanks.
Hua