1
0

pcc 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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 2c (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 2l (1).
  26. The options are:
  27. .TP \w'\fL-D\ \fIname=def\ '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 2.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. .BI -l lib
  63. Include
  64. .BI / $objtype /lib/ape/lib lib .a
  65. as a library during the linking phase.
  66. .TP
  67. .B -B
  68. Don't complain about functions used without
  69. ANSI function prototypes.
  70. .TP
  71. .B -V
  72. Enable
  73. .B void*
  74. conversion warnings, as in
  75. .IR 2c (1).
  76. .TP
  77. .B -v
  78. Echo the preprocessing, compiling, and loading commands
  79. before they are executed.
  80. .TP
  81. .BI -D name=def
  82. .br
  83. .ns
  84. .TP
  85. .BI -D name
  86. Define the
  87. .I name
  88. to the preprocessor,
  89. as if by
  90. .LR #define .
  91. If no definition is given, the name is defined as
  92. .LR 1 .
  93. .TP
  94. .BI -U name
  95. Undefine the
  96. .I name
  97. to the preprocessor,
  98. as if by
  99. .LR #undef .
  100. .TP
  101. .BI -I dir
  102. .L #include
  103. files whose names do not begin with
  104. .L /
  105. are always
  106. sought first in the directory
  107. of the
  108. .I file
  109. argument,
  110. then in directories named in
  111. .B -I
  112. options,
  113. then in
  114. .BR /$objtype/include/ape .
  115. .TP
  116. .B -N
  117. Don't optimize compiled code.
  118. .TP
  119. .B -S
  120. Print an assembly language version of the object code
  121. on standard output.
  122. .TP
  123. .B -a
  124. Instead of compiling, print on standard output acid functions (see
  125. .IR acid (1))
  126. for examining structures declared in the source files.
  127. .TP
  128. .B -aa
  129. Like
  130. .B -a
  131. except that functions for structures declared in included header files
  132. are omitted.
  133. .TP
  134. .B -F
  135. Enable vararg type checking as described in
  136. .IR 2c (1).
  137. This is of limited use without the appropriate
  138. .B #pragma
  139. definitions.
  140. .PP
  141. The APE environment contains all of the include
  142. files and library routines specified in the ANSI C standard
  143. (X3.159-1989), as well as those specified in the IEEE Portable
  144. Operating System Interface standard (POSIX, 1003.1-1990, ISO 9945-1).
  145. In order to access the POSIX routines, source programs should
  146. define the preprocessor constant
  147. .BR _POSIX_SOURCE .
  148. .SH FILES
  149. .TF /$objtype/lib/ape/libap.a
  150. .TP
  151. .B /sys/include/ape
  152. directory for machine-independent
  153. .B #include
  154. files.
  155. .TP
  156. .B /$objtype/include/ape
  157. directory for machine-dependent
  158. .B #include
  159. files.
  160. .TP
  161. .B /$objtype/lib/ape/libap.a
  162. ANSI C/POSIX library.
  163. .SH "SEE ALSO"
  164. .IR cpp (1),
  165. .IR 2c (1),
  166. .IR 2a (1),
  167. .IR 2l (1),
  168. .IR mk (1),
  169. .IR nm (1),
  170. .IR acid (1),
  171. .IR db (1),
  172. .IR prof (1)
  173. .PP
  174. Howard Trickey,
  175. ``APE \(em The ANSI/POSIX Environment''
  176. .SH SOURCE
  177. .B /sys/src/cmd/pcc.c
  178. .SH BUGS
  179. The locale manipulation functions are minimal.
  180. Signal functions and terminal characteristic
  181. handlers are only minimally implemented.
  182. .IR Link
  183. always fails, because Plan 9 doesn't support multiple links to a file.
  184. The functions related to setting effective user and group ids
  185. cannot be implemented because the concept doesn't exist in Plan 9.