AdaCore / gnat-llvm

LLVM based GNAT compiler
179 stars 18 forks source link

How to build a cross GNAT-LLVM? #17

Closed rod-chapman closed 3 years ago

rod-chapman commented 3 years ago

Are there any instructions or guidance for building a cross GNAT-LLVM? I'm interested in RISC-V RV32IM with a ZFP runtime for now for performance testing of SPARKNaCl. Thanks, Rod

ArnaudCharlet commented 3 years ago

LLVM and GNAT LLVM are always cross compilers, you just enable the RISC-V back-end in LLVM and GNAT LLVM will generate code for it via the --target switch (like clang). As for a ZFP runtime, there is no provision for building one in GNAT LLVM currently, so this needs to be handled manually.

ArnaudCharlet commented 3 years ago

Actually I went ahead and added a 'make zfp' rule to build a bare zfp runtime as a reference point that you can then adapt further to your target.