genode/repos/base/src/test/ada
Norman Feske ca971bbfd8 Move repositories to 'repos/' subdirectory
This patch changes the top-level directory layout as a preparatory
step for improving the tools for managing 3rd-party source codes.
The rationale is described in the issue referenced below.

Issue #1082
2014-05-14 16:08:00 +02:00
..
add.cc Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
main.adb Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
README Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
startup.cc Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
target.mk Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
test_package.ads Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00

This directory contains a test for using freestanding Ada code with Genode.

The program relies on the normal startup procedure of a Genode process.
Execution starts at the 'crt0' assembly entry provided by the startup library.
The 'crt0' code sets up the stack of the main thread and calls the '_main'
function implemented in the C++ portion of Genode's startup library. In turn,
the '_main' function calls 'main' of the actual program. The main function of
this example calls the Ada main procedure. The test further exercises the call
of C functions from Ada code. So the integration of Ada and C code is almost
seamless.

For building the Ada test program, you must have installed the GNU GNAT Ada
compiler. Right now, we are using the host version of this compiler, which
is save as long as we do not use advanced Ada features such as exceptions.
To enable building the test program, add 'gnat' to the 'SPECS' declaration
of your '<builddir>/etc/specs.conf'. Otherwise, the Genode build system
will skip the target.

Please note that the current version of this program does not use 'gnatbind'.
Therefore, package elaboration is not executed.