Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

c89(1) OSS Shell and Utilities Reference Manual
-l l Contains all functions required by the C language output of the lex utility that are not
made available through the -l c operand.
-l m Contains all functions referenced in the math.h header le.
-l y Contains all functions required by the C language output of the yacc utility that are not
made available through the -l c operand.
In the absence of ags that inhibit invocation of a linker utility, such as -c and -E, c89 directs the
linker to search the standard C library after all other object les and libraries are searched.
If a C++ source le operand or a -Wcpluscplus ag is specied, c89 directs the linker to search
the C++ run-time library before it searches the standard C library. If you want the libraries to be
searched in a specic order or linking options to be processed in a specied order, you should
start the appropriate linker (eld, ld,ornld) directly from the OSS shell and not use the c89 com-
mand to do the linking.
Libraries residing in the Guardian le system cannot be specied as -l operands because of the
naming convention. They can be specied in the desired order with the -Weld, -Wld,or-Wnld
ag.
Standard Include Directories
The standard include directory contains the standard C and C++ header les. c89 passes a -I ag
naming this directory as the last -I ag when processing source les. In the OSS environment,
the directory is /usr/include.
Standard Library Directories
The standard library directories contain the TNS/R native shared run-time libraries (SRLs) used
by the nld utility or the dynamic-link libraries (DLLs) used by the eld or ld utility to resolve
external references.
In the OSS environment, a linker rst searches the directory that contains the current version of
the operating system image (the active /G/system/sysnn directory). The linker then searches the
/lib, /usr/lib, and /usr/local/lib directories.
The value of the COMP_ROOT environment variable is added to the beginning of /lib, /usr/lib,
and /user/local/lib. By default, the value of COMP_ROOT is null in the OSS environment.
See the eld(1) or ld(1) reference page for more information about controlling the search order for
a PIC le linker.
Default Flags
If no ags are specied, c89 behaves as if the following ags were specied:
-Wsystype=oss -o a.out -Wenv=common -Wfieldalign=auto
-Wrefalign=8 -Woptimize=1 -Wansistreams -Winline
-WTandem_float (TNS/R-targeted compilations) or
-WIEEE_float (TNS/E-targeted compilations)
-Wlist -Wnoinnerlist -Wsuppress -Wstdfiles -Wnomap
-Wnoextensions -Wnooverflow_traps -Wnoremarks
-Wnoinspect -Wnosaveabend -WBdynamic
-Wnon_shared (TNS/R-targeted compilations) or
-Wcall_shared (TNS/E-targeted compilations)
-Wnoincludewhole -Wnoreexport -Wnooptionl_lib
-Wversion3
-Wwarn
-Wextern_data=no_gp (TNS/R-targeted compilations)
-D_XOPEN_SOURCE -I/usr/include -L/lib -L/usr/lib
-L/usr/local/lib -lc
224 Hewlett-Packard Company 527188-003