🌐
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%
🌐
GitHub
github.com › gcc-mirror › gcc › blob › master › README
gcc/README at master · 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.
Author   gcc-mirror
🌐
GitHub
github.com › topics › gcc-compiler
gcc-compiler · GitHub Topics · GitHub
Script collection to build ready to use GCC 13.1.0 cross and/or native toolchains: C and C++ for all, (Fortran, ADA, D and GO for native compiler only).
🌐
Googlesource
gnu.googlesource.com › gcc
gcc - Git at Google
Sign in · gnu/gcc · GNU Compiler Collection · Mirrored from git://gcc.gnu.org/git/gcc.git · Clone this repo: · Branches · trunk · devel/analyzer · devel/autopar_devel · devel/autopar_europar_2021
🌐
GNU
gcc.gnu.org › git.html
GCC: Anonymous read-only Git access - GNU Project
Anonymous read-only access to the GCC project Git source repository.
🌐
GitHub
github.com › gcc-mirror › gcc › releases
Releases · gcc-mirror/gcc
gcc-mirror / gcc Public mirror mirrored from git://gcc.gnu.org/git/gcc.git · Notifications · You must be signed in to change notification settings · Fork 4.7k · Star 10.7k · Releases · gcc-mirror/gcc · You can create a release to package software, along with release notes and links to binary files, for other people to use.
Author   gcc-mirror
🌐
Go Packages
pkg.go.dev › github.com › gcc-mirror › gcc
gcc module - github.com/gcc-mirror/gcc - Go Packages
The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs.
🌐
GitHub
github.com › oracle › gcc
GitHub - oracle/gcc: Unofficial mirror of https://gcc.gnu.org/git/gcc.git · GitHub
This is an unofficial mirror of the http://gcc.gnu.org/git/ GCC repository. In addition to frequent updates from the upstream source, it contains:
Author   oracle
🌐
Sourcegraph
sourcegraph.com › r › github.com › gcc-mirror › gcc
gcc-mirror/gcc - Sourcegraph
Search across 2 million+ open source repositories for free. Powered by Sourcegraph Code Search.
Find elsewhere
🌐
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
Top answer
1 of 2
12

The .md (machine description) files of GCC source contain stuff to generate assembly. GCC contains several specialized C/C++ code generators (and some of them translates the .md files into code emitting assembly).

GCC is a very complex program. The documentation of GCC MELT (an obsolete project) contains several interesting links and slides, notably refering to the Indian GCC Resource Center

Most of the optimizations in GCC happens in the middle-end (which is mostly independent of source language or target system), notably with many passes working on the Gimple representations.

The GCC repo is an SVN repository.

See also this answer, notably the pictures inside it.

2 of 2
5

The actual source code for GCC is most accessible from here:

https://gcc.gnu.org/svn.html

The software is accessible via SVN (subversion), a source code control system. This would be installed on many versions of Linux/UNIX, but if not on your platform, you can install the svn kit and then fetch the source using the following command:

svn checkout svn://gcc.gnu.org/svn/gcc/trunk SomeLocalDir

GCC is complex and would take significant experience to understand the nature of how the application actually compiles to different architectures.

In a nutshell, GCC has three major components - front-end, middle and back-end processing. The front-end processor has the component of the language parsing to understand the syntax of languages (like C, C++, Objective-C, etc). The front-end deconstructs the code to a portable construct which is then passed to the back-end for compilation to the target environment.

The middle part performs code analysis and optimisation, attempting to prioritise the code to generate the best possible output at the end of the full process. Technically, optimisation can occur at any part of the process as patterns are discovered during analysis.

The back-end processor compiles the code to a tree-style output format (not actually final executable code). Based on what the expected output is designed to be, the "pseudo-code" is optimised for using registers, bit-sizes, endian-ness, and so on. The final code is then generated during the assembly phase, which converts the back-end code into machine executable instructions.

It's important to note that the compiler has many options to deal with output formats so you can create output to many classes of architecture, usually out of the box. For cross-compiling and target compiler options, try checking out this link:

https://gcc.gnu.org/install/configure.html

🌐
GitHub
gist.github.com › dstrebkov › ebe070c1e35d94f859c6cacae8d642ef
GCC 12 or GCC 13 install from sources · GitHub
Save dstrebkov/ebe070c1e35d94f859c6cacae8d642ef to your computer and use it in GitHub Desktop. ... This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters ... Because it builds gcc from sources, whereas apt-get merely downloads a compiled version.
🌐
GitHub
github.com › aixoss › gcc
GitHub - aixoss/gcc: GNU Compiler Collection (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 ...
Forked by 2 users
Languages   C 36.9% | Ada 17.0% | Java 16.1% | C++ 14.7% | Go 4.2% | HTML 3.1%
🌐
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.
🌐
GitHub
github.com › gitGNU › gnu_gcc
GitHub - gitGNU/gnu_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 ...
Author   gitGNU
🌐
D-meiser
d-meiser.github.io › 2015 › 11 › 30 › building-gcc-trunk.html
Building gcc from source
This post gives a quick walk through of how to go about building gcc from source.
🌐
GitHub
github.com › gcc-mirror
gcc-mirror · GitHub
gcc · gcc Public mirror · C++ 10.7k 4.7k · Showing 1 of 1 repositories · gcc Public mirror · There was an error while loading. Please reload this page. gcc-mirror/gcc’s past year of commit activity · C++ 10,707 GPL-2.0 4,704 0 49 Updated · Feb 25, 2026 ·
🌐
GitHub
github.com › cmbant › docker-gcc-build
GitHub - cmbant/docker-gcc-build: Build latest gcc from sources on git gcc repository mirror
Build latest gcc from sources on git gcc repository mirror - cmbant/docker-gcc-build
Starred by 4 users
Forked by 4 users
Languages   Dockerfile
🌐
GitHub
github.com › Talustus › gcc_source
GitHub - Talustus/gcc_source: The GNU Compiler
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 ...
Author   Talustus
🌐
Public Git Hosting
repo.or.cz › official-gcc.git
Public Git Hosting - official-gcc.git/summary
The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs.