GNAT Cross-Compiler: Difference between revisions

Jump to navigation Jump to search
m
Fix minor issue with tag closure
[unchecked revision][unchecked revision]
m (Added additional information regarding sysroot)
m (Fix minor issue with tag closure)
Line 298:
[https://docs.adacore.com/gprbuild-docs/html/gprbuild_ug.html GPRbuild] is a build tool designed for instrumenting the compilation of GNAT projects. It is written and maintained by AdaCore and is installed alongside their GNAT compiler or can be built from source. Its source code is publicly available on [https://github.com/AdaCore/gprbuild AdaCore's Github profile]. Its function is analogous to that of GNU Make. It is capable of compiling projects featuring a variety of source languages such as Ada, C and Assembly, among others. Modern versions of GNAT do not natively feature the capability to compile GNAT project files, and will require the use of GPRbuild.
 
GPRbuild will not automatically recognise the existence of the new cross-compiler toolchain. Additional steps are necessary before GPRbuild will recognise our target architecture as being valid. This is accomplished by adding configuration information about the newly built toolchain to GPRbuild's 'knowledge base' linker configuration file. This file instructs GPRbuild how to link executables and libraries using the various toolchains supported by the host system. If GPRbuild was installed as part of an AdaCore GNAT installation, this configuration file will be located at <tt>${prefix}/share/gprconfig/linker.xml></tt>, where <tt>${prefix}</tt> is the location of the GNAT install directory. The easiest way to add a new target architecture is to duplicate an existing toolchain's target configuration. Inside the linker configuration file, search for an existing configuration such as <tt>leon-elf</tt>, and duplicate each entry for the existing configuration. modifying it to reflect the newly built <tt>i686-elf</tt>, or similar, target.
 
''Note: GPRbuild uses regular expressions to pattern match the target triplets.''
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu