Previous: Order of Compilation Issues, Up: Compiling Using gcc

3.5 Examples

The following are some typical Ada compilation command line examples:

$ gcc -c xyz.adb
Compile body in file xyz.adb with all default options.
$ gcc -c -O2 -gnata xyz-def.adb
Compile the child unit package in file xyz-def.adb with extensive optimizations, and pragma Assert/Debug statements enabled.
$ gcc -c -gnatc abc-def.adb
Compile the subunit in file abc-def.adb in semantic-checking-only mode.