Prefix/Darwin

Prefix/Darwin Article description::brings the power of Gentoo to Darwin (macOS/OS X) based systems, similar to pkgsrc, macports, and homebrew.

General

 * macOS follows the normal bootstrap procedure
 * Project:Prefix/Bootstrap#Bootstrapping_Prefix
 * Bootstraps currently done via GCC ( is set by default)
 * host/Apple Clang from xcode tools is used then GCC is built as soon as possible
 * Using GCC as the "system" compiler within Prefix has problems
 * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90709 (general tracker for macOS header/frameworks issues with GCC)
 * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78352 (Blocks support)
 * As a result, can't build things using e.g. Aqua (nice GUI) integrations or other Frameworks (e.g. git keychain integration).
 * We use the system (host) linker because we can't build Apple's linker independently within our prefix without Clang, because it uses Blocks
 * Possibility of bootstrapping via Clang
 * It's possible but doesn't work yet!
 * Needs some work to get sysroot, SDK paths right. See what e.g. macports does for hints.
 * is the meta bug for this work.
 * Help very much welcome!
 * To attempt a full bootstrap using Clang (this won't work yet, but it'll do something):
 * Suggestion: start with trying to build Clang, LLVM, and friends within a fully-built working GCC-bootstrapped Prefix and go from there
 * Suggestion: look at macports patches

arm64-macos
M1 macs, etc.

As of 20230423, arm64-macos can now be bootstrapped with. By default, the "stable" snapshot is used, but cannot be bootstrapped. Since support is still highly experimental, a manual bootstrap is recommended. You should be prepared to debug and report any problem should it arise, see Prefix/Manual Bootstrap for more information.

" bootstrap-prefix.sh fails with macOS 13 (Ventura)" currently tracks all the known bootstrap issues on macOS 13. Make sure to watch it for any further development of the situation.

Again, since support is highly experimental, unlike, the vast majority of the packages are currently masked on. Almost everything needs to be unmasked manually right now (in case you see any masked packages that prevents bootstrap from progressing, please report it at ).

Finally, the toolchain still needs to be worked on. As of early 2023, we're still waiting for GCC support to be merged upstream and in a release (GCC 12?). We currently use a snapshot from GCC maintainer Iain Sandoe's personal development branch in our scripts as a temporarily solution, see See https://github.com/iains/gcc-darwin-arm64. Furthermore, fails to build, so the linker from the host is used for now. Occasionally, incompatible linker options may cause package build failures.


 * - Prefix: Big Sur ARM (M1 MacBook Pro MYD82LL/A) build failure due to missing symbols
 * - fails to build during prefix bootstrap on M1 (Big Sur 11.4)

x64-macos
Works okay!

ppc-macos
Still somewhat supported as the supported OS versions age.

x86-macos
Support was dropped recently due to lack of interest, but could be restored with a sponsor/cheerleader.