Alire on macOS, revisited
This note covers some of the considerations thatβll apply when running Alire on macOS.
Read more Β»This note covers some of the considerations thatβll apply when running Alire on macOS.
Read more Β»These are notes on building GCC 12.2.0 and GNAT tools for Apple silicon.
There were two main problems:
Recently, on the Gitter Ada Programming Language lobby, there have been discussions on cross-compiling for Cortex M micro-controllers, specifically the BBC micro:bit, using the Raspberry Pi.
TL;DR: it's not going to be easy, unfortunately. Maybe later (or earlier?) Raspbian releases will help.
Read more Β»This post is based on the README from the corresponding Github repository.
That repository attempts to cope with expected changes in Appleβs approach to software development kits, specifically where to find the system headers (youβd expect /usr/include).
Read more Β»After you've installed Xcode (or, my preference, the Command Line Tools via xcode-select -install) so that you can install and use GNAT, you may expect to be able to compile C code too.
Mojave may surprise you with
$ gcc casing.c -o casing casing.c:1:10: fatal error: stdio.h: No such file or directory 1 | #include <stdio.h> | ^~~~~~~~~ compilation terminated.
The reason, according to this question and its answers, is that Apple's developer tools, in particular the clang compiler, know where to find the include files under /Library/Developer; GCC doesn't (I'm sure it could be made to, but ...) and so we have to add an extra step to install them in the normal place:
$ sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / Password: installer: Package name is macOS_SDK_headers_for_macOS_10.14 installer: Installing at base path / installer: The install was successful.You may need to repeat this after macOS or Command Line Tools (or Xcode) updates.
Apple's software development tools are based on LLVM, and Apple don't seem to feel it necessary to keep GCC and friends up to date with changes in the Apple tools or security policies.
GDB has been particularly affected by this. You can see why a tool which is capable of interacting with running programs would have to be treated with caution.
Read more Β»The public version of the AdaCore Ravenscar RTS is released under the full GPL. It seemed as if it would be a good idea (and fun!) to produce an independent RTS with the GCC Runtime Library Exception(FAQ).
Read more Β»These notes describe building GCC 5.1.0 for the Cortex M4 on Mac OS X.
My target board is the STM32M4F29I Discovery.
Read more Β»These notes describe building GCC 5.1.0 for Mac OS X, with Ada, C, C++, Fortran, Objective C, Objective C++, and various GNAT tools.
Read more Β»AdaCore's doinstall is an excellent way of installing the compiler where you want to. Unfortunately, GCC 4.9 uses the shared libgcc_s.1.dylib, which has no @rpath-type constructs, and so the compiler executables expect to find libgcc_s.1.dylib in the place it was built for. (Not to mention libstdc++.6.dylib.)
Read more Β»