# Install x86_64-elf-gcc with Homebrew, MacPorts

GNU compiler collection for x86_64-elf. Version 16.1.0 via Homebrew; verified 2026-05-01.

## Install

```sh
sudo av install brew:x86_64-elf-gcc
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install x86_64-elf-gcc
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install x86_64-elf-gcc
```

  Evidence: MacPorts ports tree: cross/x86_64-elf-gcc/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:x86_64-elf-gcc
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/x86_64-elf-gcc>
- **Version:** 16.1.0
- **Source summary:** GNU compiler collection for x86_64-elf
- **Homepage:** <https://gcc.gnu.org>
- **Repository:** <https://gcc.gnu.org/git/gcc.git>
- **Upstream docs:** <https://gcc.gnu.org/>
- **License:** GPL-3.0-or-later WITH GCC-exception-3.1
- **Source archive:** <https://ftpmirror.gnu.org/gnu/gcc/gcc-16.1.0/gcc-16.1.0.tar.xz>
- **Last updated:** 2026-05-01T04:23:32Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- x86_64-elf-c++ (cli)
- x86_64-elf-cpp (cli)
- x86_64-elf-g++ (cli)
- x86_64-elf-gcc (cli)
- x86_64-elf-gcc-16.1.0 (cli)
- x86_64-elf-gcc-ar (cli)
- x86_64-elf-gcc-nm (cli)
- x86_64-elf-gcc-ranlib (cli)
- x86_64-elf-gcov (cli)
- x86_64-elf-gcov-dump (cli)
- x86_64-elf-gcov-tool (cli)
- x86_64-elf-lto-dump (cli)
- x86_64-elf-c++ (alias)
- x86_64-elf-cpp (alias)
- x86_64-elf-g++ (alias)
- x86_64-elf-gcc (alias)
- x86_64-elf-gcc-16.1.0 (alias)
- x86_64-elf-gcc-ar (alias)
- x86_64-elf-gcc-nm (alias)
- x86_64-elf-gcc-ranlib (alias)
- x86_64-elf-gcov (alias)
- x86_64-elf-gcov-dump (alias)
- x86_64-elf-gcov-tool (alias)
- x86_64-elf-lto-dump (alias)

## Dependencies

- gmp
- libmpc
- mpfr
- x86_64-elf-binutils
- zstd

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 16.1.0
- Package-manager updated: 2026-05-01
- Local data: ok
- Upstream repository: https://gcc.gnu.org
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

x86_64-elf-gcc is GCC built as a cross compiler for the `x86_64-elf` target. Its package role is not to be a separate compiler project, but to provide the GNU Compiler Collection configured for freestanding 64-bit x86 ELF output without assuming the host operating system's headers, C library, startup files, or ABI conventions.

That makes it a standard tool for operating-system kernels, bootloaders, freestanding runtimes, and bare-metal experiments. It usually works together with `x86_64-elf-binutils`, which supplies the matching target assembler, linker, and object-file tools.

### Project history

GCC began as the GNU C Compiler, written for the GNU operating system and first released in 1987. It later expanded into the GNU Compiler Collection, with official front ends for C, C++, Objective-C, Objective-C++, Fortran, Ada, Go, D, Modula-2, COBOL, Rust, Algol 68, and related runtime libraries documented by the GCC project.

The GCC governance and release story also matters to cross packages. GCC's 2.95 release in July 1999 was the first after the GCC/EGCS reunification, and the project has since been maintained by a global developer community under a steering committee. The modern GCC site emphasizes regular releases that work across native and cross targets.

### Adoption history

Cross compilation has been central to GCC's identity because GCC supports many processors and systems. The official GCC homepage explicitly says the project aims for releases that work on a variety of native and cross targets, while OSDev documentation explains why hobby OS and kernel developers build target-specific GCCs instead of relying on the host compiler.

For `x86_64-elf`, adoption is concentrated in OSDev and freestanding x86-64 work. The target prefix lets build systems call `x86_64-elf-gcc` and get code-generation defaults for x86-64 ELF rather than the host triple. OSDev guidance also notes that a target-specific compiler removes the need to pass host-overriding options such as `-m64` for every build.

### How it is used

Typical users compile freestanding C or C++ with options such as `-ffreestanding`, link with a custom linker script, and provide their own runtime entry point instead of relying on a hosted C library. The compiler may also be used as the driver for assembly and linking so it selects the matching target Binutils tools.

In kernel work, x86-64 has hardware and ABI details that package users must understand beyond simply choosing this compiler. OSDev material commonly calls out issues such as separate 32-bit and 64-bit toolchains, bootloader expectations, and x86-64 red-zone behavior; the package gives the target compiler, but the build still has to define the freestanding environment correctly.

### Why package nerds care

x86_64-elf-gcc is important because it packages the first serious bootstrap hurdle of hobby OS development. Instead of every user manually building a cross GCC, the package provides a stable prefixed compiler that can be dropped into Makefiles and tutorials.

It is also a clear example of how package names can describe configuration rather than upstream identity. The upstream is GCC; the meaningful package distinction is the target triple, which changes what the compiler assumes about object format, runtime, and operating-system services.

### Timeline

- 1987-03-22: GCC 1.0 is first released as the GNU C Compiler.
- 1999-04: The EGCS steering committee is appointed as the official GCC maintainer after the GCC/EGCS reunification process.
- 1999-07-31: GCC 2.95 is released as the first GCC release after GCC/EGCS reunification.
- 2000s: OSDev communities popularize target-prefixed GCC cross compilers such as `i686-elf-gcc` and later `x86_64-elf-gcc` for freestanding kernels.
- 2026-04-30: GCC 16.1 is released, and the GCC homepage lists ongoing support for native and cross targets.

### Related projects

- GNU Binutils provides the assembler, linker, and object tools required by a matching `x86_64-elf` GCC toolchain.
- GDB is commonly built as a target-aware debugger alongside cross GCC and Binutils.
- Newlib and other small C libraries are used when a freestanding cross compiler grows into a hosted embedded or OS-specific toolchain.
- LLVM/Clang can also target freestanding x86-64 ELF workflows, often with `lld` and LLVM binary tools.

### Sources

- <https://gcc.gnu.org/>
- <https://gcc.gnu.org/gcc-2.95/>
- <https://gcc.gnu.org/onlinedocs/>
- <https://gcc.gnu.org/releases.html>
- <https://gcc.gnu.org/steering.html>
- <https://wiki.osdev.org/Bare_Bones>
- <https://wiki.osdev.org/GCC_Cross-Compiler>
- <https://wiki.osdev.org/Why_do_I_need_a_Cross_Compiler%3F>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** x86_64-elf-gcc
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- MacPorts - x86_64-elf-gcc: normalized package name match | MacPorts ports tree: cross/x86_64-elf-gcc/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [x86_64-elf-binutils](https://www.automicvault.com/pkg/brew/x86-64-elf-binutils/) - Runtime dependency declared by Homebrew.
- [zstd](https://www.automicvault.com/pkg/brew/zstd/) - Runtime dependency declared by Homebrew.
- [aarch64-elf-gcc](https://www.automicvault.com/pkg/brew/aarch64-elf-gcc/) - Shares the same upstream homepage.
- [arm-none-eabi-gcc](https://www.automicvault.com/pkg/brew/arm-none-eabi-gcc/) - Shares the same upstream homepage.
- [i686-elf-gcc](https://www.automicvault.com/pkg/brew/i686-elf-gcc/) - Shares the same upstream homepage.
- [m68k-elf-gcc](https://www.automicvault.com/pkg/brew/m68k-elf-gcc/) - Shares the same upstream homepage.
- [riscv64-elf-gcc](https://www.automicvault.com/pkg/brew/riscv64-elf-gcc/) - Shares the same upstream homepage.
- [mingw-w64](https://www.automicvault.com/pkg/brew/mingw-w64/) - Shares av.db curated category or tags: cli, compilers, cross-compilation, developer-tools, gcc.
- [arm-linux-gnueabihf-binutils](https://www.automicvault.com/pkg/brew/arm-linux-gnueabihf-binutils/) - Shares av.db curated category or tags: cli, compilers, cross-compilation, developer-tools.
- [arm-none-eabi-binutils](https://www.automicvault.com/pkg/brew/arm-none-eabi-binutils/) - Shares av.db curated category or tags: cli, compilers, cross-compilation, developer-tools.
- [crosstool-ng](https://www.automicvault.com/pkg/brew/crosstool-ng/) - Shares av.db curated category or tags: cli, compilers, cross-compilation, developer-tools.

## Combined YAML source

View the package source record on GitHub. [combined/x86_64-elf-gcc.yml](https://github.com/automic-vault/db/blob/main/combined/x86_64-elf-gcc.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
