Releases: simonjwright/building-gcc-macos-native
GCC 12.2.0 (x86_64)
This release is for GCC 12.2.0 built on Mac OS X El Capitan (10.11, Darwin 15), with Xcode 8.2.1 and Python 3.9.8.
Also runs on macOS versions up to at least Monterey (12, Darwin 21). It will run on Intel Macs, or M1 Macs under Rosetta, and uses the Xcode SDK if found, the Command Line Tooks SDK if not.
Compilers included: Ada, C, C++.
Tools included (all at version 23.0.0, and all with the Runtime Library Exception, except as noted):
Full GPL:
- GDB from https://sourceware.org/git/binutils-gdb.git at tag
gdb-12.1-release
and without Python support).
GPL with the Runtime Library Exception:
- AUnit from https://github.com/AdaCore/aunit
- GNATCOLL from:
- https://github.com/AdaCore/gnatcoll-core
- https://github.com/AdaCore/gnatcoll-bindings (ZLIB is included, OMP and LZMA are not (the GNATCOLL version for LZMA requires thread support in the system library, not available on macOS))
- https://github.com/AdaCore/gnatcoll-db (only the SQLite backend)
- Gprbuild from https://github.com/AdaCore/gprbuild
- Langkit from https://github.com/AdaCore/langkit
- Libadalang from https://github.com/AdaCore/libadalang
- Libadalang tools from https://github.com/AdaCore/libadalang-tools
- Templates parser from https://github.com/AdaCore/templates-parser
- XMLAda from https://github.com/AdaCore/xmlada
Configured with:
--prefix=/opt/gcc-12.2.0
--without-libiconv-prefix
--disable-libmudflap
--disable-libstdcxx-pch
--disable-libsanitizer
--disable-libcc1
--disable-libcilkrts
--disable-multilib
--disable-nls
--enable-languages=c,c++,ada
--host=x86_64-apple-darwin15
--target=x86_64-apple-darwin15
--build=x86_64-apple-darwin15
--without-isl
--with-build-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
--with-sysroot=
--with-specs='%{!sysroot=*:
--sysroot=%:if-exists-else(/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk)}'
--with-build-config=no
--enable-bootstrap
Notes
The software was built using the building-gcc-macos-native scripts at Github, tag gcc-12.2.0.
Compiler
The compiler is GPL version 3. The runtime has the GCC Runtime Exception, so executables built with it can be released on proprietary terms.
GMP, MPFR, MPC
These libraries (releases 6.2.1, 4.1.0, 1.2.1 respectively) are installed with the compiler.
Include, library paths
As noted here, Apple have changed the location of system include files and libraries; they used to be copied from the SDKs to the "standard" /usr/include
and /usr/lib
either automatically or on command.
This compiler has been built so you don't need to take any related action to use it: unfortunately, this means that paths in /usr/local
and /Library/Frameworks
aren't searched.
GNAT CE 2021
This is GNAT Community Edition built on Mac OS X El Capitan (10.11, Darwin 15), with Xcode 8.2.1.
Also runs on macOS versions up to Big Sur (11, Darwin 20).
gnat-ce-2021-x86_64-apple-darwin15.pkg
Compilers included: Ada, C, C++.
The compiler, runtime and tools included are licensed under the GPL v3, and are sourced from the AdaCore Community download site.
Target: x86_64-apple-darwin15
Configured with:
/Volumes/Miscellaneous1/src/gnat-ce-2021/gcc-10-2021-20210519-19A74-src/configure
--prefix=/opt/gnat-ce-2021
--without-libiconv-prefix
--disable-libmudflap
--disable-libstdcxx-pch
--disable-libsanitizer
--disable-libcc1
--disable-libcilkrts
--disable-multilib
--disable-nls
--enable-languages=c,c++,ada
--host=x86_64-apple-darwin15
--target=x86_64-apple-darwin15
--build=x86_64-apple-darwin15
--without-isl
--with-build-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
--with-sysroot=
--with-specs='%{!sysroot=*:--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk}'
--with-build-config=no
--enable-bootstrap
Tools , Libraries
- AUnit
- GDB
- GMP
- GNATCOLL bindings
- GNATCOLL core
- GNATCOLL database
- Gprbuild
- Langkit
- Libadalang and tools
- MPC
- MPFR
- XMLAda
Install
Xcode is required.
Download the binary .pkg
. It's not signed, so don't double-click on it; instead, right-click on it and Open. Accept the warning. You will be guided through the installation.
Setting PATH
PATH
needs to be set to include /opt/gnat-ce-2021/bin
at the front:
bash
Insert
export PATH=/opt/gnat-ce-2021/bin:$PATH
in your ~/.bash_profile_common
.
zsh
Likewise, but in ~/.zshrc
.
See here for helpful information on moving to zsh
.
Installing GDB
gdb
has to be 'code-signed' (unless you're willing to run it as root!) and under Sierra and later macOS releases there are additional steps that have to be taken.
For El Capitan, see here.
For Sierra, and High Sierra, see here; in the case of High Sierra, the 10.12.1 paragraph refers.
For Mojave, Catalina and Big Sur, see here.
Notes
The software was built using the building-gcc-macos-native scripts at Github, tag gnat-ce-2021
.
Include, library paths
As discussed here, Apple have changed the location of system include files and libraries; they used to be copied from the SDKs to the "standard" /usr/include
and /usr/lib
either automatically or on command. The workround that this distribution includes has the unfortunate side-effect that /usr/local/include
and /usr/include/lib
are not automatically included in C/C++ compilations and links.
Tool notes
GDB was rebuilt with the new compiler, with an additional patch.
To use the debugger, it must be signed: again, see above.
Distribution
The distribution was prepared using the distributing-gcc project at Github, tag gnat-ce-2021
.