Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ucselx!crash!pnet01!cwr From: cwr@pnet01.cts.com (Will Rose) Newsgroups: comp.os.minix Subject: PC ACK compiler options Message-ID: <8149@crash.cts.com> Date: 23 Mar 91 09:16:04 GMT Sender: root@crash.cts.com Organization: People-Net [pnet01], El Cajon CA Lines: 146 I've been trying to install the recently posted profiling code for the 68000 on an 8086. Hitherto, I've always rather liked the MINIX PC ACK compiler despite its occasional bugs. Even the 64+64K address space has the benfit (for me) of concentrating the mind, and preventing the addition of everything but the kitchen sink to the code. In a teaching system, this is an advantage. However, what is not an advantage in a teaching system is inadequate documention, and I have now found that the compiler documentation is appallingly bad. The rest of the system has source code, the answer to all such complaints, but the compiler is binary only. It has now been on sale, essentially unchanged, for three or four years without so much as a complete list of options; and the reason I've only just discovered this is since the compiler documentation gives a list of flags, I hitherto believed that it included all that there were. (Descriptions of the startup code and of the packed assembler library files would be nice, but a complete list of options is essential). Below is a list of options for cc, asld and the various compiler passes. I found these by experiment, and I haven't tested two-letter and three-letter combinations since there are too many of them. (The cc LIB option is an exception which I got from documentation.) Some options I've got wrong, and some I don't understand; those with question marks against them are especially suspect. If anyone has anything to add to this list, please email me and I'll summarise to the net when I get done with this profiling code. Thanks - Will ================================================================ Minix PC 1.5.10 ACK Compiler options cc -D the flag -Dx=y defines a macro x with value y -F use a file instead of a pipe for preprocessor output -I -Idir searches dir for include files -L disable profiling -LIB produce a library module -O ??? -R complain about all non Kernighan & Ritchie code -S stop after producing an assembly code file -T -Tdir tells cem to use dir for temporary files -U undefine a macro -c compile only, do not link (same as -S) -i use separate I & D space (64K + 64K) -o put output on file named by next arg -p use mrtso.s as header -v verbose mode - print pass names -w suppress warning messages asld -L a listing is produced on standard output -T used to specify a directory for the temporary file -i use separate I & D space (64K + 64K) -o output goes to file named by next argument -s a symbol table is produced on standard output ======================================================================== Program Input Output Operation performed /lib/cpp prog.c prog.i Pre-processing /lib/cem prog.i prog.k Parsing and semantic analysis /usr/lib/opt prog.k prog.m Optimization of the intermediate code /usr/lib/fpp prog.m prog.M Floating point intermediate code /usr/lib/cg prog.M prog.s Code generation /usr/lib/asld prog.s a.out Assembly and linking # # Test of compiler options # /usr/lib/cpp test.c >test.C /usr/lib/cem -L test.C test.k /usr/lib/opt test.k >test.m /usr/lib/cg test.m test.s /usr/bin/asld /usr/lib/mrtso.s test.s /usr/lib/libc.a /usr/lib/end.s \ -s >symbol.out ast -X ============================================================================== Valid options for cpp option -D # define a macro option -I # set include file directory option -M # set minimum identifier length (fixed at 8 ?) option -P # do not add filename to first line of file option -U # undefine a macro Valid options for cem option -D # ignored option -I # ignored option -L # suppress filename and line recording option -M # set minimum identifier length (fixed at 8 ?) option -N # do not move the EXP EM-codes to the head of the file (why ?) option -R # warn of non-K&R code option -T # set the temporary file directory option -U # ignored option -V # ignored option -n # do not use register variables option -p # include calls to _procenter, _procexit for profiling option -w # suppress warning messages Valid options for opt option -L # produce a library module option -n # suppress optimisation (completely ?) Valid options for fpp Fpp takes no options Valid options for cg option -p # no apparent effect, but cc -O generates -p4 (?) option -w # suppress warning messages (?) Valid options for asld option -D # define a macro option -I # search a specific library option -L # produce a listing on standard output option -T # set the temporary file directory option -U # undefine a macro option -i # use separate I&D space option -o # name output file option -s # produce a symbol table on standard output ======================================================================== ----------------------------------------------------------------------- "If heaven too had passions | Will Rose even heaven would | UUCP: {nosc ucsd hplabs!hp-sdd}!crash!pnet01!cw grow old." - Li Ho. | ARPA: crash!pnet01!cwr@nosc.mil | INET: cwr@pnet01.cts.com UUCP: {nosc ucsd hplabs!hp-sdd}!crash!pnet01!cwr ARPA: crash!pnet01!cwr@nosc.mil INET: cwr@pnet01.cts.com