Sync patch from openeuler/pin-gcc-client 2022/12/08 (cherry picked from commit ca424952fd407c6158e330c8e21d67442aec4c16)