Skip to content

Instantly share code, notes, and snippets.

@shawnanastasio
Created January 14, 2021 23:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shawnanastasio/0e55762b8c232fe24007847af2021240 to your computer and use it in GitHub Desktop.
Save shawnanastasio/0e55762b8c232fe24007847af2021240 to your computer and use it in GitHub Desktop.
Building gcc-darwin-arm64 fork natively from clang
$ brew install mpfr gmp libmpc
$ git clone https://github.com/iains/gcc-darwin-arm64
$ mkdir build-gcc && cd build-gcc
$ CC=clang CXX=clang++ ../gcc-darwin-arm64/configure \
--with-gmp=/opt/homebrew/Cellar/gmp/6.2.1 \
--with-mpfr=/opt/homebrew/Cellar/mpfr/4.1.0 \
--with-mpc=/opt/homebrew/Cellar/libmpc/1.2.1 \
--with-native-system-header-dir=/usr/include \
--with-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk \
--disable-nls \
--build aarch64-apple-darwin20 \
--disable-multilib \
--prefix=/opt/gcc-darwin-arm64
$ CC=clang CXX=clang++ make -j4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment