pcc 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. .TH PCC 1
  2. .SH NAME
  3. pcc \- APE C compiler driver
  4. .SH SYNOPSIS
  5. .B pcc
  6. [
  7. .I option ...
  8. ]
  9. [
  10. .I name ...
  11. ]
  12. .SH DESCRIPTION
  13. .I Pcc
  14. compiles and loads C programs,
  15. using APE (ANSI C/POSIX) include files and libraries.
  16. Named files ending with
  17. .B .c
  18. are preprocessed with
  19. .IR cpp (1),
  20. then compiled with one of the compilers described in
  21. .IR 8c (1),
  22. as specified by the environment variable
  23. .BR $objtype .
  24. The object files are then loaded using one of the loaders described in
  25. .IR 8l (1).
  26. The options are:
  27. .TP \w'\fL-D\ \fIname\ 'u
  28. .B "-+
  29. Accept C++
  30. .B //
  31. comments.
  32. .TP
  33. .BI -o " out"
  34. Place loader output in file
  35. .I out
  36. instead of the default
  37. .BR 8.out ,
  38. .BR v.out ,
  39. etc.
  40. .TP
  41. .B -P
  42. Omit the compilation and loading phases;
  43. leave the result of preprocessing
  44. .IB name .c
  45. in
  46. .IB name .i\f1.
  47. .TP
  48. .B -E
  49. Like
  50. .BR -P ,
  51. but send the result to standard output.
  52. .TP
  53. .B -c
  54. Omit the loading phase.
  55. .TP
  56. .B -p
  57. Insert profiling code into the executable output.
  58. .TP
  59. .B -w
  60. Print compiler warning messages.
  61. .TP
  62. .B -W
  63. Print all the messages that
  64. .B -w
  65. would print as warnings, but make them errors.
  66. .TP
  67. .BI -l lib
  68. Include
  69. .BI / $objtype /lib/ape/lib lib .a
  70. as a library during the linking phase.
  71. .TP
  72. .B -B
  73. Don't complain about functions used without
  74. ANSI function prototypes.
  75. .TP
  76. .B -V
  77. Enable
  78. .B void*
  79. conversion warnings, as in
  80. .IR 8c (1).
  81. .TP
  82. .B -v
  83. Echo the preprocessing, compiling, and loading commands
  84. before they are executed.
  85. .TP
  86. .BI -x " file"
  87. Produce an export file in the executable, as described in
  88. .IR 8l (1).
  89. .TP
  90. .BI -D name=def
  91. .br
  92. .ns
  93. .TP
  94. .BI -D name
  95. Define the
  96. .I name
  97. to the preprocessor,
  98. as if by
  99. .LR #define .
  100. If no definition is given, the name is defined as
  101. .LR 1 .
  102. .TP
  103. .BI -U name
  104. Undefine the
  105. .I name
  106. to the preprocessor,
  107. as if by
  108. .LR #undef .
  109. .TP
  110. .BI -I dir
  111. .L #include
  112. files whose names do not begin with
  113. .L /
  114. are always
  115. sought first in the directory
  116. of the
  117. .I file
  118. argument,
  119. then in directories named in
  120. .B -I
  121. options,
  122. then in
  123. .BR /$objtype/include/ape .
  124. .TP
  125. .B -N
  126. Don't optimize compiled code.
  127. .TP
  128. .B -S
  129. Print an assembly language version of the object code
  130. on standard output.
  131. .TP
  132. .B -T
  133. Pass type signatures on all external and global entities.
  134. The signature is based on the C
  135. .B signof
  136. operator.
  137. See
  138. .IR dynld (2).
  139. .TP
  140. .B -a
  141. Instead of compiling, print on standard output acid functions (see
  142. .IR acid (1))
  143. for examining structures declared in the source files.
  144. .TP
  145. .B -aa
  146. Like
  147. .B -a
  148. except that functions for structures declared in included header files
  149. are omitted.
  150. .TP
  151. .B -F
  152. Enable vararg type checking as described in
  153. .IR 8c (1).
  154. This is of limited use without the appropriate
  155. .B #pragma
  156. definitions.
  157. .TP
  158. .B -f
  159. (ARM only) Generate VFP hardware floating point instructions.
  160. .PP
  161. The APE environment contains all of the include
  162. files and library routines specified in the ANSI C standard
  163. (X3.159-1989), as well as those specified in the IEEE Portable
  164. Operating System Interface standard (POSIX, 1003.1-1990, ISO 9945-1).
  165. In order to access the POSIX routines, source programs should
  166. define the preprocessor constant
  167. .BR _POSIX_SOURCE .
  168. .SH FILES
  169. .TF /$objtype/lib/ape/libap.a
  170. .TP
  171. .B /sys/include/ape
  172. directory for machine-independent
  173. .B #include
  174. files.
  175. .TP
  176. .B /$objtype/include/ape
  177. directory for machine-dependent
  178. .B #include
  179. files.
  180. .TP
  181. .B /$objtype/lib/ape/libap.a
  182. ANSI C/POSIX library.
  183. .SH "SEE ALSO"
  184. .IR cpp (1),
  185. .IR 8c (1),
  186. .IR 8a (1),
  187. .IR 8l (1),
  188. .IR mk (1),
  189. .IR nm (1),
  190. .IR acid (1),
  191. .IR db (1),
  192. .IR prof (1)
  193. .br
  194. Howard Trickey,
  195. ``APE \(em The ANSI/POSIX Environment''
  196. .SH SOURCE
  197. .B /sys/src/cmd/pcc.c
  198. .SH BUGS
  199. The locale manipulation functions are minimal.
  200. Signal functions and terminal characteristic
  201. handlers are only minimally implemented.
  202. .IR Link
  203. always fails, because Plan 9 doesn't support multiple links to a file.
  204. The functions related to setting effective user and group ids
  205. cannot be implemented because the concept doesn't exist in Plan 9.