From: Alex Smith Date: Fri, 4 Jul 2008 00:22:33 +0000 (-0400) Subject: Documentation for .a and .c99 external calls X-Git-Tag: 0.29~213 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=f5d2d9c54f70871d128572596b66ffa2bb9ec3c3;p=intercal.git Documentation for .a and .c99 external calls --- diff --git a/doc/ick.txi b/doc/ick.txi index f7f8327..53d9a03 100644 --- a/doc/ick.txi +++ b/doc/ick.txi @@ -4693,9 +4693,10 @@ compiler, and @acronym{GNU} cpp and ld, for them to work in the current version of @cic{}. @menu -* External Calls to C:: How to put @ical{} calls in C. -* Using External Calls:: What happens when you use -e. -* Expansion Libraries:: Expanding the compiler's capabilities. +* External Calls to C:: How to put @ical{} calls in C. +* Miscellaneous External Calls:: Other things you can link in. +* Using External Calls:: What happens when you use -e. +* Expansion Libraries:: Expanding the compiler's capabilities. @end menu @node External Calls to C @@ -5280,6 +5281,37 @@ Note that @ical{} variables are not stored on the C stack, nor are any of the metadata surrounding them, and so are not affected unduly by control flow operations. +@node Miscellaneous External Calls +@section Miscellaneous External Calls +@cindex external calls, miscellaneous +@cindex miscellaneous external calls +@cindex libraries, external calls +@cindex external calls, libraries +@cindex C99 +@cindex external calls, C99 + +It is possible to specify other information to the external calls +system by using the filename list after all the options are given. To +be precise, certain filename patterns are recognised and used to +change the options that are used to compile the externally-called +files. + +The @samp{.c99} extension is treated identically to @samp{.c}, except +that it causes the file with that extension to be preprocessed as C99 +(the more modern version of the C standard, the older C89 is more +common), and that all C files involved will be compiled and linked as +C99. (This corresponds to @option{-std=c99} in @command{gcc}.) + +The @samp{.a} extension indicates that an object-code library should +be linked in to the final program. This is most commonly used to link +in the maths library @file{libm.a} and other such system libraries. +If the filename is of the form @samp{lib*.a}, then the file will be +searched for in the standard directories for libraries on your system, +and also where the @cic{} libraries are stored (which may be the same +place); otherwise, the current directory will be searched. +(Specifying @file{libm.a} on the command line corresponds to passing +@option{-lm} to @command{gcc}.) + @node Using External Calls @section Using External Calls @cindex using external calls