pcc 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  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 -a
  133. Instead of compiling, print on standard output acid functions (see
  134. .IR acid (1))
  135. for examining structures declared in the source files.
  136. .TP
  137. .B -aa
  138. Like
  139. .B -a
  140. except that functions for structures declared in included header files
  141. are omitted.
  142. .TP
  143. .B -F
  144. Enable vararg type checking as described in
  145. .IR 8c (1).
  146. This is of limited use without the appropriate
  147. .B #pragma
  148. definitions.
  149. .TP
  150. .B -f
  151. (ARM only) Generate VFP hardware floating point instructions.
  152. .PP
  153. The APE environment contains all of the include
  154. files and library routines specified in the ANSI C standard
  155. (X3.159-1989), as well as those specified in the IEEE Portable
  156. Operating System Interface standard (POSIX, 1003.1-1990, ISO 9945-1).
  157. In order to access the POSIX routines, source programs should
  158. define the preprocessor constant
  159. .BR _POSIX_SOURCE .
  160. .SH FILES
  161. .TF /$objtype/lib/ape/libap.a
  162. .TP
  163. .B /sys/include/ape
  164. directory for machine-independent
  165. .B #include
  166. files.
  167. .TP
  168. .B /$objtype/include/ape
  169. directory for machine-dependent
  170. .B #include
  171. files.
  172. .TP
  173. .B /$objtype/lib/ape/libap.a
  174. ANSI C/POSIX library.
  175. .SH "SEE ALSO"
  176. .IR cpp (1),
  177. .IR 8c (1),
  178. .IR 8a (1),
  179. .IR 8l (1),
  180. .IR mk (1),
  181. .IR nm (1),
  182. .IR acid (1),
  183. .IR db (1),
  184. .IR prof (1)
  185. .br
  186. Howard Trickey,
  187. ``APE \(em The ANSI/POSIX Environment''
  188. .SH SOURCE
  189. .B /sys/src/cmd/pcc.c
  190. .SH BUGS
  191. The locale manipulation functions are minimal.
  192. Signal functions and terminal characteristic
  193. handlers are only minimally implemented.
  194. .IR Link
  195. always fails, because Plan 9 doesn't support multiple links to a file.
  196. The functions related to setting effective user and group ids
  197. cannot be implemented because the concept doesn't exist in Plan 9.