|
NAME9c, 9a, 9l, 9ar - C compiler, assembler, linker, archiverSYNOPSIS9c [ -I path ] [ -D name ] file ...9a file ... 9l [ -o target ] object ... [ library ... ] [ -Lpath ... ] [ -lname ... ] 9ar key [ posname ] afile [ file ... ] DESCRIPTIONThese programs are shell scripts that invoke the appropriate standard tools for the current operating system and architecture. One can use them to write portable recipes for mkfiles.9c compiles the named C files into object files for the current system. The system C compiler is invoked with warnings enabled. The -I option adds path to the include path, and the -D option defines name in the C preprocessor. 9c always defines the symbol PLAN9PORT defined in the C preprocessor and adds $PLAN9/include to the include path. 9c also defines __sun__ on SunOS systems. 9a assembles the named files into object files for the current system. Unlike some system assemblers, it does not promise to run the C preprocessor on the source files. 9l links the named object files and libraries to create the target executable. Each -l option specifies that a library named libname.a be found and linked. The -L option adds directories to the library search path. 9l invokes the system linker with $PLAN9/lib already on the library search path. 9l searches the named objects and libraries for symbols of the form __p9l_autolib_name, which it takes as indication that it should link $PLAN9/lib/libname.a as well. It also examines such libraries to find their own dependencies. A single -l option at the beginning of the command line disables this behavior. The symbol __p9l_autolib_name is added to an object file by the macro AUTOLIB( name ), defined in <u.h>. Header files associated with libraries contain AUTOLIB annotations; ordinary programs need not use them. Due to shortcomings in the implementation, a source file may not contain the same AUTOLIB statement multiple times. 9ar maintains object file archives called libraries. The exact set of valid command keys varies from system to system, but 9ar always provides the following key characters:
When a d, r, or m key is specified, 9ar inserts a table of contents, required by the linker, at the front of the library. The table of contents is rebuilt whenever the archive is modified. EXAMPLES
SOURCE/bin Visit the GSP FreeBSD Man Page Interface. |