Poco build: infinite loop when makedepend.gcc on Ubuntun 20.04 gcc/g++ version: 10.2

I build Poco 1.9.0 with gcc/g++ 7.5.0 of Ubuntu 18.05, there is no any problem. However, the build fail on Ubuntu 20.04 with gcc/g++ 10.2.0 the build process go into infinite loop, it stuck at creating dependency refer the below message until I manually stop it with CTRL+C.

** Creating dependency info for src/LineEndingConverter.cpp mkdir -p /home/thales/LDC/Poco/Foundation/.dep/Linux/x86_64 /home/thales/LDC/Poco/build/script/makedepend.gcc src/LineEndingConverter.cpp ...........