# 使用 Homebrew, MacPorts 安装 m68k-elf-gcc

查看 m68k-elf-gcc 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install m68k-elf-gcc
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

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

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

## 软件包事实

- **软件包键:** brew:m68k-elf-gcc
- **软件包管理器:** Homebrew
- **版本:** 16.1.0
- **来源摘要:** GNU compiler collection m68k-elf
- **主页:** <https://gcc.gnu.org>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- m68k-elf-c++ (别名)
- m68k-elf-cpp (别名)
- m68k-elf-g++ (别名)
- m68k-elf-gcc (别名)
- m68k-elf-gcc-16.1.0 (别名)
- m68k-elf-gcc-ar (别名)
- m68k-elf-gcc-nm (别名)
- m68k-elf-gcc-ranlib (别名)
- m68k-elf-gcov (别名)
- m68k-elf-gcov-dump (别名)
- m68k-elf-gcov-tool (别名)
- m68k-elf-lto-dump (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 16.1.0
## 项目历史与用法

m68k-elf-gcc is a target-prefixed GCC cross compiler for building code for Motorola 68000-family ELF targets.

### 项目历史

GCC began as the GNU system's compiler and grew into the GNU Compiler Collection. The current project includes front ends for many languages and runtime libraries, and it is developed as free software under the GNU Project.

The `m68k-elf-gcc` package is a target build of upstream GCC rather than an independent compiler project. Its executables are prefixed with `m68k-elf-` so they can live beside the host compiler and other cross compilers.

GCC's official documentation includes M680x0 and ColdFire target options for generating and tuning code for processors such as 68000, 68010, 68020, 68030, 68040, 68060, CPU32, and ColdFire families.

### 采用历史

GCC is widely adopted because it targets many architectures and supports both native and cross compilation. The GCC mission statement explicitly calls out multiple architectures, diverse environments, new targets, and an open development model.

The supplied package facts show Homebrew and MacPorts packages for `m68k-elf-gcc`, placing it in the small but important family of retrocomputing, embedded, and bare-metal cross compilers available through desktop package managers.

### 使用方式

The GCC manual describes the usual executable as `gcc`, `machine-gcc` when cross-compiling, or `machine-gcc-version` for a versioned driver. This package follows that convention with commands such as `m68k-elf-gcc`, `m68k-elf-g++`, `m68k-elf-cpp`, and related GCC helper tools.

Developers use it with `m68k-elf-binutils` to compile C and C++ code, assemble generated output, and link ELF binaries for bare-metal 68k targets. Target options such as `-march`, `-mcpu`, `-mtune`, `-m68000`, and `-m68020-60` control generated code for different 680x0 and ColdFire variants.

### 为什么软件包爱好者会关心

Cross-GCC packages are more than a compiler binary: they encode a target triplet, ABI assumptions, binutils pairing, runtime-library choices, and build-system expectations.

For package maintainers, `m68k-elf-gcc` is notable because it makes a non-host architecture feel native to build systems while keeping all tools target-prefixed and isolated from the host GCC or Clang.

### 时间线

- 1987: GCC first emerged as the GNU C Compiler era began
- 2024: GCC mission statement page documents open development, multiple architectures, and new targets
- 2026: GCC 16.1 listed as a supported release on the official GCC site
- 2026: Homebrew package facts list GCC 16.1.0 target-prefixed m68k-elf executables

### Related projects

- m68k-elf-binutils supplies the matching assembler, linker, and object utilities.
- GNU Binutils, GNU Make, and Autoconf-era build systems are common neighbors in source builds using GCC cross compilers.
- Other GCC cross packages follow the same target-triplet executable convention.

### 来源

- <https://gcc.gnu.org/>
- <https://gcc.gnu.org/gccmission.html>
- <https://gcc.gnu.org/git.html>
- <https://gcc.gnu.org/onlinedocs/>
- <https://gcc.gnu.org/onlinedocs/gcc/Invoking-GCC.html>
- <https://gcc.gnu.org/onlinedocs/gcc/M680x0-Options.html>
- source_facts.executables
- source_facts.package-manager


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

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


## Combined YAML source

View the package source record on GitHub. [combined/m68k-elf-gcc.yml](https://github.com/mxcl/pkgdb/blob/main/combined/m68k-elf-gcc.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
