Skip to content

Instantly share code, notes, and snippets.

@jaredallard
Last active May 27, 2024 15:23
Show Gist options
  • Save jaredallard/3bc223ed2dcbea09e4944e136296c701 to your computer and use it in GitHub Desktop.
Save jaredallard/3bc223ed2dcbea09e4944e136296c701 to your computer and use it in GitHub Desktop.
Portage Configuration for an M1 Mac
# vim: set language=bash;
CHOST="aarch64-unknown-linux-gnu"
# Optimization flags.
COMMON_FLAGS="-march=armv8.5-a+fp16+simd+crypto+i8mm -mtune=native -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
RUSTFLAGS="-C target-cpu=native"
# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C
# Note: Update "-j" to be a number more appropriate for your
# hardware (e.g., m2 max has more cores).
MAKEOPTS="-j4"
# GENTOO_MIRRORS is the mirrors to use for emerge sources. The author
# hosts one on R2, which should be fast enough for most usecases.
GENTOO_MIRRORS="https://gentoo.rgst.io/gentoo"
# EMERGE_DEFAULT_OPTS is the options to use for emerges. We use -j3 here to
# enable compiling at most 3 packages at the same time. This also makes logs not spam
# our screen everytime. It's nice :)
EMERGE_DEFAULT_OPTS="--jobs 3"
# VIDEO_CARDS is the video card (gpu) we're using. We use "asahi" for the mesa package provided
# by the asahi-overlay.
VIDEO_CARDS="asahi"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment