opts68k.pas 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. {
  2. $Id$
  3. Copyright (c) 1993-98 by Florian Klaempfl, Pierre Muller
  4. interprets the commandline options which are m68k specific
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. }
  17. unit opts68k;
  18. interface
  19. uses
  20. options;
  21. type
  22. poption68k=^toption68k;
  23. toption68k=object(toption)
  24. procedure interpret_proc_specific_options(const opt:string);virtual;
  25. end;
  26. implementation
  27. uses
  28. globals;
  29. procedure toption68k.interpret_proc_specific_options(const opt:string);
  30. var
  31. j : longint;
  32. begin
  33. case opt[2] of
  34. 'A' : begin
  35. if copy(opt,3,length(opt)-2)='o' then
  36. begin
  37. output_format:=of_o;
  38. assem_need_external_list := false;
  39. end
  40. else
  41. if copy(opt,3,length(opt)-2)='m' then
  42. begin
  43. output_format:=of_mot;
  44. assem_need_external_list := true;
  45. end
  46. else
  47. if copy(opt,3,length(opt)-2)='i' then
  48. begin
  49. output_format:=of_mit;
  50. assem_need_external_list := false;
  51. end
  52. else
  53. if copy(opt,3,length(opt)-2)='gas' then
  54. begin
  55. output_format:=of_gas;
  56. assem_need_external_list := false;
  57. end
  58. else
  59. IllegalPara(opt);
  60. end;
  61. 'O' : begin
  62. for j:=3 to length(opt) do
  63. case opt[j] of
  64. '-' : initswitches:=initswitches-[cs_optimize,cs_maxoptimieren,cs_littlesize];
  65. 'a' : initswitches:=initswitches+[cs_optimize];
  66. 'g' : initswitches:=initswitches+[cs_littlesize];
  67. 'G' : initswitches:=initswitches-[cs_littlesize];
  68. 'x' : initswitches:=initswitches+[cs_optimize,
  69. cs_maxoptimieren];
  70. '2' : opt_processors := MC68020;
  71. else
  72. IllegalPara(opt);
  73. end;
  74. end;
  75. else IllegalPara(opt);
  76. end;
  77. end;
  78. end.
  79. {
  80. $Log$
  81. Revision 1.1 1998-03-25 11:18:16 root
  82. Initial revision
  83. Revision 1.13 1998/03/13 22:45:58 florian
  84. * small bug fixes applied
  85. Revision 1.12 1998/03/10 16:27:39 pierre
  86. * better line info in stabs debug
  87. * symtabletype and lexlevel separated into two fields of tsymtable
  88. + ifdef MAKELIB for direct library output, not complete
  89. + ifdef CHAINPROCSYMS for overloaded seach across units, not fully
  90. working
  91. + ifdef TESTFUNCRET for setting func result in underfunction, not
  92. working
  93. Revision 1.11 1998/03/10 01:17:21 peter
  94. * all files have the same header
  95. * messages are fully implemented, EXTDEBUG uses Comment()
  96. + AG... files for the Assembler generation
  97. Revision 1.10 1998/03/06 00:52:31 peter
  98. * replaced all old messages from errore.msg, only ExtDebug and some
  99. Comment() calls are left
  100. * fixed options.pas
  101. Revision 1.9 1998/03/05 02:44:15 peter
  102. * options cleanup and use of .msg file
  103. Revision 1.8 1998/03/04 17:33:48 michael
  104. + Changed ifdef FPK to ifdef FPC
  105. Revision 1.7 1998/03/02 01:48:47 peter
  106. * renamed target_DOS to target_GO32V1
  107. + new verbose system, merged old errors and verbose units into one new
  108. verbose.pas, so errors.pas is obsolete
  109. Revision 1.6 1998/02/22 23:03:20 peter
  110. * renamed msource->mainsource and name->unitname
  111. * optimized filename handling, filename is not seperate anymore with
  112. path+name+ext, this saves stackspace and a lot of fsplit()'s
  113. * recompiling of some units in libraries fixed
  114. * shared libraries are working again
  115. + $LINKLIB <lib> to support automatic linking to libraries
  116. + libraries are saved/read from the ppufile, also allows more libraries
  117. per ppufile
  118. Revision 1.5 1998/02/21 03:34:27 carl
  119. + mit asm syntax support
  120. Revision 1.4 1998/02/13 10:35:12 daniel
  121. * Made Motorola version compilable.
  122. * Fixed optimizer
  123. Revision 1.3 1998/02/12 11:50:15 daniel
  124. Yes! Finally! After three retries, my patch!
  125. Changes:
  126. Complete rewrite of psub.pas.
  127. Added support for DLL's.
  128. Compiler requires less memory.
  129. Platform units for each platform.
  130. Revision 1.2 1998/01/09 19:22:03 carl
  131. * externals are now generated as appropriate
  132. Revision 1.1.1.1 1997/11/27 08:32:57 michael
  133. FPC Compiler CVS start
  134. Pre-CVS log:
  135. CEC Carl-Eric Codere
  136. FK Florian Klaempfl
  137. PM Pierre Muller
  138. + feature added
  139. - removed
  140. * bug fixed or changed
  141. History:
  142. 4th cotober 1997:
  143. + copied stuff from opts386.pas and started unit (CEC)
  144. 8th cotober 1997:
  145. * new command line options management (FK)
  146. }