As the title, I have the source code of GCC, and I am going to build GCC using it. However, as everyone knows, script configure is a Unix Shell script, so I cannot run it under Windows.
Therefore, how can I run a Unix Shell script Under Windows to build GCC?
Cygwin or MSYS2 (Mingw-w64) give you a fully-fledged "Unix-like" environment on Windows: https://www.msys2.org/
Note: Programs compiled with Cygwin will always depend on the Cygwin-DLL (i.e. Cygwin compatibility layer) at runtime! Meanwhile, MSYS2 (Mingw-w64) produces "native" Windows executables.
If you just need a Unix shell (and maybe some other basic Unix utilities), then give BusyBox a try: https://frippery.org/busybox/
(BusyBox is a single binary that contains many common Unix tools)
Open Command Prompt and navigate to the folder where the script file is available. Type Bash script-filename.sh and hit the enter key. It will execute the script, and depending on the file, you should see an output. https://www.landstaronline.org/