Hello,
I am trying to build GNAT LLVM on macOS (Apple Silicon) and I am running into toolchain issues.
Current setup:
-
LLVM 21.1.8 (Homebrew)
-
Clang 21.1.8
-
GNAT Native 14.2.1
-
gprbuild 26.0.1
-
Alire configured with
gnat_native=14.2.1
I configured LLVM using:
-
PATH=/opt/homebrew/opt/llvm@21/bin -
CPPFLAGS=/opt/homebrew/opt/llvm@21/include -
LDFLAGS=/opt/homebrew/opt/llvm@21/lib
llvm-config --version correctly shows 21.1.8.
Initially I had:
-
opt: command not found -
gprbuild: c++ compiler not found
After fixing those, make now fails with:
clang: error: unknown argument: '-gnatea'
clang: error: unknown argument: '-gnatez'
gnatmake: "xoscons.adb" compilation error
It looks like Clang is being invoked instead of the GNAT Ada compiler.
Also, my GNAT installation seems incomplete:
-
gnatmake,gnatbind,gnatlinkexist -
but
gnat,gnatls, andgnatgccare missing
I also installed Homebrew GCC 15, but the build still fails with the same errors.
Has anyone successfully built GNAT LLVM on macOS Apple Silicon recently?
Could you share:
-
the exact LLVM / Clang / GNAT versions you used,
-
whether extra setup is needed on macOS,
-
and whether the missing GNAT binaries indicate a broken Alire toolchain installation?
Thanks