cem.1 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. .TH CEM 1L 86/11/12
  2. .SH NAME
  3. cem \- ACK C compiler
  4. .SH SYNOPSIS
  5. .B cem
  6. [ option ] ... file ...
  7. .SH DESCRIPTION
  8. .I Cem
  9. is a
  10. .I cc (1)-like
  11. C compiler that uses the C front-end compiler
  12. .I cemcom (1)
  13. of the Amsterdam Compiler Kit.
  14. .I Cem
  15. interprets its arguments not starting with a '\-' as
  16. source files, to be compiled by the various parts of the compilation process,
  17. which are listed below.
  18. File arguments whose names end with \fB.\fP\fIcharacter\fP are interpreted as
  19. follows:
  20. .IP .[ao]
  21. object file.
  22. .IP .[ci]
  23. C source code
  24. .IP .e
  25. EM assembler source file.
  26. .IP .k
  27. compact EM file, not yet optimized by the EM peephole optimizer.
  28. .IP .m
  29. compact EM file, already optimized by the peephole optimizer.
  30. .IP .s
  31. assembler file.
  32. .LP
  33. The actions to be taken by
  34. .I cem
  35. are directed by the type of file argument and the various options that are
  36. presented to it.
  37. .PP
  38. The following set of options, which is a mixture of options interpreted by
  39. .I cc (1)
  40. and
  41. .I ack (?)
  42. are interpreted by
  43. .I cem .
  44. (The options not specified here are passed to the loader.)
  45. .IP \fB\-B\fP\fIname\fP
  46. Use
  47. .I name
  48. as front-end compiler instead of the default
  49. .I cemcom (1).
  50. .br
  51. Same as "\fB\-Rcem=\fP\fIname\fP".
  52. .IP \fB\-C\fP
  53. Run C preprocessor
  54. .I /lib/cpp
  55. only and prevent it from eliding comments.
  56. .IP \fB\-D\fP\fIname\fP\fB=\fP\fIdef\fP
  57. Define the
  58. .I name
  59. to the preprocessor, as if by "#define".
  60. .IP \fB\-D\fP\fIname\fP
  61. .br
  62. Same as "\fB\-D\fP\fIname\fP\fB=1\fP".
  63. .IP \fB\-E\fP
  64. Run only the macro preprocessor on the named files and send the
  65. result to standard output.
  66. .IP \fB\-I\fP\fIdir\fP
  67. \&"#include" files whose names do not begin with '/' are always
  68. sought first in the directory of the \fIfile\fP argument, then in directories
  69. in \fB\-I\fP options, then in directories on a standard list (which in fact
  70. consists of "/usr/include").
  71. .IP \fB\-L\fP\fIdir\fP
  72. Use \fIdir\fP as library-containing directory instead of the default.
  73. .IP \fB\-N\fP\fIc\fP
  74. Only effective if ACK pipeline is used.
  75. This option causes some default actions and options to be suppressed, according
  76. to
  77. .I c :
  78. .RS
  79. .IP \fBc\fP
  80. do not convert from EM a.out to local a.out format (i.e., skip the
  81. .B cv
  82. pass.)
  83. .IP \fBl\fP
  84. do not pass the default loader flags to the
  85. .B ld
  86. pass.
  87. .RE
  88. .IP \fB\-P\fP
  89. Same as \fB\-E\fP, but sending the result of input file \fIfile\fP\fB.[ceis]\fP
  90. to \fIfile\fP\fB.i\fP.
  91. .IP \fB\-R\fP
  92. Passed to \fIcemcom\fP(1) in order to parse the named C programs according
  93. to the C language as described in [K&R] (also called \fIRestricted\fP C).
  94. .IP \fB\-R\fP\fIprog\fP\fB=\fP\fIname\fP
  95. .br
  96. Use \fIname\fP as program for phase \fIprog\fP of the compilation instead of
  97. the default.
  98. \&\fIProg\fP is one of the following names:
  99. .RS
  100. .IP \fBcpp\fP
  101. macro preprocessor
  102. .IP \fBcem\fP
  103. front\-end compiler
  104. .IP \fBopt\fP
  105. EM peephole optimizer
  106. .IP \fBdecode\fP
  107. EM compact to EM assembler translator
  108. .IP \fBencode\fP
  109. EM assembler to EM compact translator
  110. .IP \fBbe\fP
  111. EM compact code to target\-machine assembly code compiler
  112. .IP \fBcg\fP
  113. same as \fBbe\fP
  114. .IP \fBas\fP
  115. assembler
  116. .IP \fBld\fP
  117. linker/loader
  118. .IP \fBcv\fP
  119. a.out format converting program (only if ACK pipeline is used)
  120. .RE
  121. .IP \fB\-R\fP\fIprog\fP\fB\-\fP\fIoption\fP
  122. .br
  123. Pass \fB\-\fP\fIoption\fP to the compilation phase indicated by \fIprog\fP.
  124. .IP \fB\-S\fP
  125. Same as \fB\-c.s\fP.
  126. .IP \fB\-U\fP\fIname\fP
  127. .br
  128. Remove any initial definition of \fIname\fP.
  129. .IP \fB\-V\fP\fIcm\fP.\fIn\fP,\ \fB\-V\fIcm\fP.\fIncm\fP.\fIn\fP\ ...
  130. .br
  131. Set the size and alignment requirements of the C constructs of the named
  132. C input files.
  133. The letter \fIc\fP indicates the simple type, which is one of
  134. \fBs\fP(short), \fBi\fP(int), \fBl\fP(long), \fBf\fP(float), \fBd\fP(double) or
  135. \fBp\fP(pointer).
  136. The \fIm\fP parameter can be used to specify the length of the type (in bytes)
  137. and the \fIn\fP parameter for the alignment of that type.
  138. Absence of \fIm\fP or \fIn\fP causes the default value to be retained.
  139. To specify that the bitfields should be right adjusted instead of the
  140. default left adjustment, specify \fBr\fP as \fIc\fP parameter
  141. without parameters.
  142. .br
  143. This option is passed directly to \fIcemcom\fP(1).
  144. .IP \fB\-c\fP
  145. Same as \fB\-c.o\fP.
  146. .IP \fB\-c.e\fP
  147. Produce human-readable EM assembly code on \fIfile\fP\fB.e\fP for the
  148. named files \fIfile\fP\fB.[cikm]\fP
  149. .IP \fB\-c.k\fP
  150. Compile C source \fIfile\fP\fB.[ci]\fP or
  151. encode human-readable EM assembly code from \fIfile\fP\fB.e\fP
  152. into non-optimized compact EM code and write the result on \fIfile\fP\fB.k\fP
  153. .IP \fB\-c.m\fP
  154. Compile C source \fIfile\fP\fB.[ci]\fP,
  155. translate non-optimized EM code from \fIfile\fP\fB.k\fP or
  156. encode EM assembly code from \fIfile\fP\fB.e\fP
  157. into optimized compact EM code and write the result on \fIfile\fP\fB.m\fP
  158. .IP \fB\-c.o\fP
  159. Suppress the loading phase of the compilation, and force an object file to
  160. be produced even if only one program is compiled
  161. .IP \fB\-c.s\fP
  162. Compile the named \fIfile\fP\fB.[ceikm]\fP input files, and leave the
  163. assembly language output on corresponding files suffixed ".s".
  164. .IP \fB\-k\fP
  165. Same as \fB\-c.k\fP.
  166. .IP \fB\-l\fP\fIname\fP
  167. .br
  168. Append the library \fBlib\fP\fIname\fP\fB.a\fP to the list of files that
  169. should be loaded and linked into the final output file.
  170. The library is searched for in the library directory.
  171. .IP \fB\-m\fP
  172. Same as \fB\-c.m\fP.
  173. .IP \fB\-o\fP\ \fIoutput\fP
  174. .br
  175. Name the final output file \fIoutput\fP.
  176. If this option is used, the default "a.out" will be left undisturbed.
  177. .IP \fB\-p\fP
  178. Produce EM profiling code (\fBfil\fP and \fBlin\fP instructions to
  179. enable an interpreter to keep track of the current location in the
  180. source code)
  181. .IP \fB\-t\fP
  182. Keep the intermediate files, produced during the various phases of the
  183. compilation.
  184. The produced files are named \fIfile\fP\fB.\fP\fIcharacter\fP where
  185. \&\fIcharacter\fP indicates the type of the file as listed before.
  186. .IP \fB\-v\fP
  187. Verbose.
  188. Print the commands before they are executed.
  189. .IP \fB\-vn\fP
  190. Do not really execute (for debugging purposes only).
  191. .IP \fB\-vd\fP
  192. Print some additional information (for debugging purposes only).
  193. .IP \fB\-\-\fP\fIanything\fP
  194. .br
  195. Equivalent to \fB\-Rcem\-\-\fP\fIanything\fP.
  196. The options
  197. .B \-\-C ,
  198. .B \-\-E
  199. and
  200. .B \-\-P
  201. all have the same effect as respectively
  202. .B \-C ,
  203. .B \-E
  204. and
  205. .B \-P
  206. except for the fact that the macro preprocessor is taken to be the
  207. built\-in preprocessor of the \fBcem\fP phase.
  208. Most "\-\-" options are used by
  209. .I cemcom (1)
  210. to set some internal debug switches.
  211. .LP
  212. .SH SEE ALSO
  213. cemcom(1), cc(1), ack(?), as(1), ld(1)
  214. .br
  215. .IP [K&R]
  216. B.W. Kernighan and D.M. Ritchie, \fIThe C Programming Language\fP,
  217. Prentice-Hall, 1978.
  218. .SH DIAGNOSTICS
  219. .I Cem
  220. reports any failure of its components.
  221. .SH BUGS
  222. .IP \(bu
  223. All intermediate files are placed in the current working directory which
  224. causes files with the same name as the intermediate files to be overwritten.
  225. .IP \(bu
  226. .B Cem
  227. only accepts a limited number of arguments to be passed to the components.
  228. (e.g., 256).
  229. .IP \(bu
  230. Please report suggestions and other bugs to erikb@vu44.uucp