USE MINGW-W64

  1. Install mingw-w64 (Follow the "Sourceforge" link) and install it to the default Program Files based path.

  2. Select the latest "version" (for GCC), change "architecture" from i686 (32-bit) to x86_64 (64-bit), and change "threads" to win32.

  3. Add the bin folder to the beginning of your Git BASH (MINGW64) path:

     $ export PATH="c:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin:$PATH"
    

    You'll, of course, need to adjust the above path to match the version of your of your particular install:

     $ export PATH="c:/Program Files/mingw-w64/<YOUR_ARCH_VERSION_REVISION_FOLDER>/mingw64/bin:$PATH"
    

Alternatively

You may be able to just install it directly into the same folder as Git: C:\Program Files\Git.

But I haven't tried this alternative approach and I wouldn't recommend it because it is likely to cause issues when updating and may confuse uninstallers, leaving remnants. (if the two installations don't interfere to begin with)

[ Edit: GNU Make is installed as mingw32-make.exe. You can make a copy of it, somewhere in your $PATH which you have permission to, and rename it to make. Git Bash seems to respect that it's executable, even without an extension, which is handy if you don't want it picked up outside of the MinGW environment (even though it may be in your PATH). ]

Answer from veganaiZe on Stack Exchange

USE MINGW-W64

  1. Install mingw-w64 (Follow the "Sourceforge" link) and install it to the default Program Files based path.

  2. Select the latest "version" (for GCC), change "architecture" from i686 (32-bit) to x86_64 (64-bit), and change "threads" to win32.

  3. Add the bin folder to the beginning of your Git BASH (MINGW64) path:

     $ export PATH="c:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin:$PATH"
    

    You'll, of course, need to adjust the above path to match the version of your of your particular install:

     $ export PATH="c:/Program Files/mingw-w64/<YOUR_ARCH_VERSION_REVISION_FOLDER>/mingw64/bin:$PATH"
    

Alternatively

You may be able to just install it directly into the same folder as Git: C:\Program Files\Git.

But I haven't tried this alternative approach and I wouldn't recommend it because it is likely to cause issues when updating and may confuse uninstallers, leaving remnants. (if the two installations don't interfere to begin with)

[ Edit: GNU Make is installed as mingw32-make.exe. You can make a copy of it, somewhere in your $PATH which you have permission to, and rename it to make. Git Bash seems to respect that it's executable, even without an extension, which is handy if you don't want it picked up outside of the MinGW environment (even though it may be in your PATH). ]

Answer from veganaiZe on Stack Exchange
🌐
GitHub
github.com › gcc-mirror › gcc
GitHub - gcc-mirror/gcc
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different ...
Starred by 10.7K users
Forked by 4.7K users
Languages   C++ 30.1% | C 29.3% | Ada 14.0% | D 5.9% | Go 5.3% | HTML 3.6%
🌐
Googlesource
gnu.googlesource.com › gcc
gcc - Git at Google
gnu/gcc · Mirrored from git://gcc.gnu.org/git/gcc.git · Clone this repo: trunk · devel/analyzer · devel/autopar_devel · devel/autopar_europar_2021 · devel/bypass-asm · devel/c++-contracts · devel/c++-coroutines · devel/c++-modules · devel/c++-name-lookup ·
Discussions

GCC discusses moving to Git
A lot of people here are talking about GitHub and how moving GCC to GitHub is a bad idea. However, as far as I can see, they don't really mention GH; they're simply talking about moving to git. What makes people think they'll go anywhere near GitHub? More on reddit.com
🌐 r/linux
79
280
August 21, 2015
avr gcc - How do I access the "most official" repository for architecture specific GCC runtime source files&tests? - Stack Overflow
You can "browse" with anything, print it on a printer, or use any text editor. What is the relation to LLVM? There is no relation to LLVM. What do you mean? can you point me to a current resource? gcc.gnu.org/releases.html shows how to use git and FTP mirrors. More on stackoverflow.com
🌐 stackoverflow.com
How do I obtain a specific old version of GCC?
On July 1st, a change to Reddit's API pricing will come into effect. Several developers of commercial third-party apps have announced that this change will compel them to shut down their apps. At least one accessibility-focused non-commercial third party app will continue to be available free of charge. If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options: Limiting your involvement with Reddit, or Temporarily refraining from using Reddit Cancelling your subscription of Reddit Premium as a way to voice your protest. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns. More on reddit.com
🌐 r/learnprogramming
5
1
January 31, 2024
pfsense-tools.git clang gcc | Netgate Forum
Hello fellow Netgate community members. I am attempting to test the package squid version 7.1 with all the new security enhancements but I can not get it to ... More on forum.netgate.com
🌐 forum.netgate.com
August 2, 2025
Top answer
1 of 3
11

USE MINGW-W64

  1. Install mingw-w64 (Follow the "Sourceforge" link) and install it to the default Program Files based path.

  2. Select the latest "version" (for GCC), change "architecture" from i686 (32-bit) to x86_64 (64-bit), and change "threads" to win32.

  3. Add the bin folder to the beginning of your Git BASH (MINGW64) path:

     $ export PATH="c:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin:$PATH"
    

    You'll, of course, need to adjust the above path to match the version of your of your particular install:

     $ export PATH="c:/Program Files/mingw-w64/<YOUR_ARCH_VERSION_REVISION_FOLDER>/mingw64/bin:$PATH"
    

Alternatively

You may be able to just install it directly into the same folder as Git: C:\Program Files\Git.

But I haven't tried this alternative approach and I wouldn't recommend it because it is likely to cause issues when updating and may confuse uninstallers, leaving remnants. (if the two installations don't interfere to begin with)

[ Edit: GNU Make is installed as mingw32-make.exe. You can make a copy of it, somewhere in your $PATH which you have permission to, and rename it to make. Git Bash seems to respect that it's executable, even without an extension, which is handy if you don't want it picked up outside of the MinGW environment (even though it may be in your PATH). ]

2 of 3
2

You have to share Windows' PATH (and probably other) environment variables with MinGW. For MSYS2 you can share them by adding this to your Windows' env. variables:

MSYS2_PATH_TYPE=inherit

🌐
Reddit
reddit.com › r/linux › gcc discusses moving to git
r/linux on Reddit: GCC discusses moving to Git
August 21, 2015 - Git is a more powerful tool, so switching would benefit most teams in the long run. Most people who are opposed to it do so with a if it ain't broke attitude. I would imagine those who work on a project as monolithic as GCC would rather just focus on code than bother learning a more nimble version control system.
Find elsewhere
🌐
Arch Linux
aur.archlinux.org › packages › gcc-git
AUR (en) - gcc-git
*** STICKY *** These gcc*-git packages replace core's gcc* (non-git) packages. Technically, replacing the system gcc-libs can be dangerous. The possibility of a new upstream gcc git commit breaking your system isn't zero. When you compile and install this, you're using the latest git source, so you may be the first Arch user to be using that particular commit.
🌐
GNU
gcc.gnu.org › git.html
GCC: Anonymous read-only Git access - GNU Project
August 31, 2025 - Anonymous read-only access to the GCC project Git source repository.
🌐
GitHub
gist.github.com › yosoufe › ad45f45c10fe08abecbf53000d0d199f
Compile and install gcc-9.3.0 · GitHub
Compile and install gcc-9.3.0. GitHub Gist: instantly share code, notes, and snippets.
🌐
Jmeubank
jmeubank.github.io › tdm-gcc › download
Download | tdm-gcc
Older versions are still available on SourceForge: TDM-GCC files.
🌐
Public Git Hosting
repo.or.cz › official-gcc.git
Public Git Hosting - official-gcc.git/summary
repo.or.cz / official-gcc.git / summary · summary | log | graphiclog1 | graphiclog2 | commit | commitdiff | tree | refs | edit | fork · README · This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING ...
🌐
YouTube
youtube.com › mike shah
Building GCC 11 (and beyond) from Source (git repository) | (Front ends for C, C++, dlang (gdc)) - YouTube
►(GCC 9 video is here: https://youtu.be/QfPpT0O9m2k)►Find full courses on: https://courses.mshah.io/►Join as member to get perks: https://www.youtube.com/cha...
Published   February 24, 2022
Views   6K
🌐
Reddit
reddit.com › r/learnprogramming › how do i obtain a specific old version of gcc?
r/learnprogramming on Reddit: How do I obtain a specific old version of GCC?
January 31, 2024 -

Hi, as part of a project with studying old software, I'd like to get the source code for GCC 2.6.3. https://gcc.gnu.org/releases.html shows that it released November 30, 1994. But there's no link attached to it. How would I dig back in the development history to get a copy of that source code? I think I would need to do some kind of git command, but I don't know enough git to be able to actually do that. I do want to see the source code, and don't really care if it also has an executable or not.

Thanks!

🌐
Netgate Forum
forum.netgate.com › topic › 198200 › pfsense-tools-git-clang-gcc
pfsense-tools.git clang gcc | Netgate Forum
August 2, 2025 - I use git for pfsense. portsnap fetch properly fetches freebsd ports collection I'll try 14.3 with bind9 and report back.
🌐
Visual Studio Code
code.visualstudio.com › docs › sourcecontrol › overview
Source Control in VS Code
November 3, 2021 - Visual Studio Code has integrated source control management (SCM) that lets you work with Git and other version control systems directly in your editor.
🌐
Rust-gcc
rust-gcc.github.io
GCC Front-End For Rust | Alternative Rust Compiler for GCC
Going forward, we will be happy to see more LLVM vs GCC graphs in respect to compilation speed, resulting code size and performance. The project is still in an early phase with the goal to compile the offical Rust test suite. While there is no borrow-checker included with the compiler yet, we plan to integrate with the polonius effort and leverage its borrow-checking algorithms. You can find compiler status reports over on: https://github...
🌐
Phoronix
phoronix.com › news › GCC-Git-Complexities
GCC's Conversion To Git Is Still Turning Out To Be A Massive Headache - Phoronix
In response to his message, a large number of the upstream GCC developers are simply calling for the conversion of the master/trunk code and recent branches like GCC 6/7/8 to be converted into Git while the older branches can be left as-is in read-only SVN or the git-svn'ed state.
🌐
Yichaoou
yichaoou.github.io › tutorials › software › 2016 › 06 › 28 › git-bash-install-gcc
How to install gcc in Git Bash (Windows)
June 28, 2016 - Note: Git Bash in Windows cannot behave exactly the same as a linux bash. If you need to do the same in Windows, you may try CygWin. To install GCC, the trick is to install MinGW installation manager.
🌐
Stack Overflow
stackoverflow.com › questions › 61713451 › using-git-bash-unable-to-compile-c-code-gcccommand-not-found
Using Git Bash unable to compile C code: "gcc:command not found" - Stack Overflow
I was having a similar problem - assuming you are using windows, make sure your downloaded MinGW folder is in your GIT folder (C:\Program Files\Git\MinGW). I then copied the bin folder from MinGW into the mingw64 (C:\Program Files\Git\mingw64\bin) bin folder - which then recognized gcc as a command.