linux: gcc version: gcc version 11 (experimental)
windows: MSVC 19
git clone https://github.com/gcc-mirror/gcc.git
cd gcc
./contrib/download_prerequisites
mkdir build && cd build
../configure --disable-multilib
make -j${cat /proc/cpuinfo | grep "processor" | wc -l}
sudo make install
# optional
cd ../..
rm -rf gcc
/usr/lib64/libstdc++.so.6: version GLIBCXX_3.4.29 not found
sudo mv /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.bak
sudo ln -s /usr/local/lib64/libstdc++.so.6 /usr/lib/x86_64-linux-gnu/libstdc++.so.6
# command below
sudo cp /usr/local/lib64/libstdc++.so.6 /usr/lib/x86_64-linux-gnu/libstdc++.so.6
# also work for me, recommend to use ln, only need to choose one way