Next: Setting Stack Size from gnatlink, Previous: Running gnatlink, Up: Linking Using gnatlink
gnatlinkThe following switches are available with the gnatlink utility:
-A-Cgnatlink that the binder has generated C code rather than
Ada code.
-fgnatlink
will generate a separate file for the linker if the list of object files
is too long. The -f flag forces this file to be generated even if
the limit is not exceeded. This is useful in some cases to deal with
special situations where the command line length is exceeded.
-g-g.
In addition, the binder does not delete the b~mainprog.adb,
b~mainprog.o and b~mainprog.ali files.
Without -g, the binder removes these files by
default. The same procedure apply if a C bind file was generated using
-C gnatbind option, in this case the filenames are
b_mainprog.c and b_mainprog.o.
-n-v-v -v-o exec-namegnatlink try.ali creates
an executable called try.
-b target-Bdirgnat1, the Ada compiler)
from dir instead of the default location. Only use this switch
when multiple versions of the GNAT compiler are available. See the
gcc manual page for further details. You would normally use the
-b or -V switch instead.
--GCC=compiler_namegcc'. You need to use quotes around compiler_name if
compiler_name contains spaces or other separator characters. As
an example --GCC="foo -x -y" will instruct gnatlink to use
foo -x -y as your compiler. Note that switch -c is always
inserted after your command name. Thus in the above example the compiler
command that will be used by gnatlink will be foo -c -x -y.
If several --GCC=compiler_name are used, only the last
compiler_name is taken into account. However, all the additional
switches are also taken into account. Thus,
--GCC="foo -x -y" --GCC="bar -z -t" is equivalent to
--GCC="bar -x -y -z -t".
--LINK=name