3 Copyright (c) 1998-2000 by Florian Klaempfl
5 Commandline compiler for Free Pascal
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 ****************************************************************************}
24 possible compiler switches (* marks a currently required switch):
25 -----------------------------------------------------------------
26 USE_RHIDE generates errors and warning in an format recognized
28 TP to compile the compiler with Turbo or Borland Pascal
29 GDB* support of the GNU Debugger
30 I386 generate a compiler for the Intel i386+
31 M68K generate a compiler for the M68000
32 USEOVERLAY compiles a TP version which uses overlays
33 DEBUG version with debug code is generated
34 EXTDEBUG some extra debug code is executed
35 SUPPORT_MMX only i386: releases the compiler switch
36 MMX which allows the compiler to generate
38 EXTERN_MSG Don't compile the msgfiles in the compiler, always
39 use external messagefiles, default for TP
40 NOAG386INT no Intel Assembler output
41 NOAG386NSM no NASM output
42 NOAG386BIN leaves out the binary writer, default for TP
43 LOGMEMBLOCKS adds memory manager which logs the size of
44 each allocated memory block, the information
45 is written to memuse.log after compiling
46 -----------------------------------------------------------------
48 Required switches for a i386 compiler be compiled by Free Pascal Compiler:
51 Required switches for a i386 compiler be compiled by Turbo Pascal:
54 Required switches for a 68000 compiler be compiled by Turbo Pascal:
60 { people can try to compile without GDB }
61 { $error The compiler switch GDB must be defined}
63 { but I386 or M68K must be defined }
64 { and only one of the two }
67 {$fatal One of the switches I386 or M68K must be defined}
72 {$fatal ONLY one of the switches I386 or M68K must be defined}
77 {$fatal I386 switch must be on for MMX support}
110 {$error You must compile with the $O+ switch}
131 {$ifdef logmemblocks}
135 {$endif logmemblocks}
245 procedure myexit
;{$ifndef FPC}far;{$endif}
248 { Show Runtime error if there was an error }
249 if (erroraddr
<>nil) then
256 writeln('Error while reading file');
261 writeln('Error while writing file');
266 writeln('Error: Stack Overflow');
271 writeln('Error: Out of memory');
274 { we cannot use aktfilepos.file because all memory might have been
276 But we can use global parser_current_file var }
277 Writeln('Compilation aborted ',parser_current_file
,':',aktfilepos
.line
);
288 { Call the compiler with empty command, so it will take the parameters }
289 Halt(compiler
.Compile(''));
293 Revision 1.1 2002/02/19 08:23:10 sasu
296 Revision 1.1.2.1 2000/09/27 22:35:02 pierre
297 * suppress lineinfo explicit in _uses
299 Revision 1.1 2000/07/13 06:29:54 michael
302 Revision 1.60 2000/04/02 15:22:19 florian
303 * fixed bug 903: the compiler gives now a nice message if it can't create
304 the .o file, (same for future .ar)
306 Revision 1.59 2000/03/20 09:36:23 florian
307 * using the directive DEBUG when compiling the compiler will include now
308 the lineinfo unit on all targets
310 Revision 1.58 2000/03/16 10:29:06 florian
311 * disk full runerror writes now a nice message
313 Revision 1.57 2000/03/14 16:30:14 pierre
314 + lineinfo for win32 with debug
316 Revision 1.56 2000/02/18 12:34:43 pierre
317 DEBUG implies NOCATCH for go32v2
319 Revision 1.55 2000/02/10 23:44:43 florian
320 * big update for exception handling code generation: possible mem holes
321 fixed, break/continue/exit should work always now as expected
323 Revision 1.54 2000/02/09 13:22:59 peter
326 Revision 1.53 2000/01/07 01:14:30 peter
327 * updated copyright to 2000
329 Revision 1.52 1999/11/06 14:34:23 peter
330 * truncated log to 20 revs
332 Revision 1.51 1999/11/05 13:15:00 florian
333 * some fixes to get the new cg compiling again
335 Revision 1.50 1999/09/17 17:14:10 peter
336 * @procvar fixes for tp mode
337 * @<id>:= gives now an error
339 Revision 1.49 1999/09/16 23:05:54 florian
340 * m68k compiler is again compilable (only gas writer, no assembler reader)
342 Revision 1.48 1999/09/10 18:48:08 florian
343 * some bug fixes (e.g. must_be_valid and procinfo.funcret_is_valid)
344 * most things for stored properties fixed
346 Revision 1.47 1999/09/02 18:47:45 daniel
347 * Could not compile with TP, some arrays moved to heap
348 * NOAG386BIN default for TP
349 * AG386* files were not compatible with TP, fixed.
351 Revision 1.46 1999/08/28 15:34:20 florian
354 Revision 1.45 1999/08/04 00:23:18 florian
355 * renamed i386asm and i386base to cpuasm and cpubase