systems.pas 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609
  1. {
  2. $Id$
  3. Copyright (C) 1995,97 by Florian Klaempfl
  4. This unit contains information about the target systems supported
  5. (these are not processor specific)
  6. This progsam is free software; you can redistribute it and/or modify
  7. iu under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 3 of the License, or
  9. (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with this program; if not, write to the Free Software
  16. Foundation, Inc., 675 Mass Ave, Cambridge- MA 02139, USA.
  17. ****************************************************************************
  18. }
  19. unit systems;
  20. interface
  21. type
  22. tendian = (endian_little,endian_big);
  23. ttargetcpu=(no_cpu
  24. ,i386,m68k,alpha
  25. );
  26. tprocessors = (no_processor
  27. ,Class386,ClassP5,ClassP6
  28. ,MC68000,MC68100,MC68020
  29. );
  30. type
  31. tasmmode= (asmmode_none
  32. ,asmmode_i386_direct,asmmode_i386_att,asmmode_i386_intel
  33. ,asmmode_m68k_mot
  34. );
  35. const
  36. {$ifdef i386} i386asmmodecnt=3; {$else} i386asmmodecnt=0; {$endif}
  37. {$ifdef m68k} m68kasmmodecnt=1; {$else} m68kasmmodecnt=0; {$endif}
  38. asmmodecnt=i386asmmodecnt+m68kasmmodecnt+1;
  39. type
  40. ttarget = (target_none
  41. ,target_i386_GO32V1,target_i386_GO32V2,target_i386_linux,
  42. target_i386_OS2,target_i386_Win32
  43. ,target_m68k_Amiga,target_m68k_Atari,target_m68k_Mac,
  44. target_m68k_linux,target_m68k_PalmOS
  45. );
  46. ttargetflags = (tf_needs_isconsole,tf_supports_stack_checking);
  47. const
  48. {$ifdef i386} i386targetcnt=5; {$else} i386targetcnt=0; {$endif}
  49. {$ifdef m68k} m68ktargetcnt=5; {$else} m68ktargetcnt=0; {$endif}
  50. targetcnt=i386targetcnt+m68ktargetcnt+1;
  51. type
  52. tasm = (as_none
  53. ,as_i386_as,as_i386_as_aout,as_i386_asw,
  54. as_i386_nasmcoff,as_i386_nasmelf,as_i386_nasmobj,
  55. as_i386_tasm,as_i386_masm,
  56. as_i386_dbg,as_i386_coff,as_i386_pecoff
  57. ,as_m68k_as,as_m68k_gas,as_m68k_mit,as_m68k_mot,as_m68k_mpw
  58. );
  59. const
  60. {$ifdef i386} i386asmcnt=11; {$else} i386asmcnt=0; {$endif}
  61. {$ifdef m68k} m68kasmcnt=5; {$else} m68kasmcnt=0; {$endif}
  62. asmcnt=i386asmcnt+m68kasmcnt+1;
  63. type
  64. tlink = (link_none
  65. ,link_i386_ld,link_i386_ldgo32v1,
  66. link_i386_ldgo32v2,link_i386_ldw,
  67. link_i386_ldos2
  68. ,link_m68k_ld
  69. );
  70. const
  71. {$ifdef i386} i386linkcnt=5; {$else} i386linkcnt=0; {$endif}
  72. {$ifdef m68k} m68klinkcnt=1; {$else} m68klinkcnt=0; {$endif}
  73. linkcnt=i386linkcnt+m68klinkcnt+1;
  74. type
  75. tar = (ar_none
  76. ,ar_i386_ar,ar_i386_arw
  77. ,ar_m68k_ar
  78. );
  79. const
  80. {$ifdef i386} i386arcnt=2; {$else} i386arcnt=0; {$endif}
  81. {$ifdef m68k} m68karcnt=1; {$else} m68karcnt=0; {$endif}
  82. arcnt=i386arcnt+m68karcnt+1;
  83. type
  84. tres = (res_none
  85. ,res_i386_windres
  86. );
  87. const
  88. {$ifdef i386} i386rescnt=1; {$else} i386rescnt=0; {$endif}
  89. {$ifdef m68k} m68krescnt=0; {$else} m68krescnt=0; {$endif}
  90. rescnt=i386rescnt+m68krescnt+1;
  91. type
  92. tos = ( os_none,
  93. os_i386_GO32V1,os_i386_GO32V2,os_i386_Linux,os_i386_OS2,
  94. os_i386_Win32,
  95. os_m68k_Amiga,os_m68k_Atari,os_m68k_Mac,os_m68k_Linux,
  96. os_m68k_PalmOS
  97. );
  98. const
  99. i386oscnt=5;
  100. m68koscnt=5;
  101. oscnt=i386oscnt+m68koscnt+1;
  102. type
  103. tosinfo = packed record
  104. id : tos;
  105. name : string[30];
  106. shortname : string[8];
  107. sharedlibext,
  108. staticlibext,
  109. sourceext,
  110. pasext,
  111. exeext,
  112. scriptext : string[4];
  113. libprefix : string[3];
  114. Cprefix : string[2];
  115. newline : string[2];
  116. endian : tendian;
  117. stackalignment : {longint this is a little overkill no ?? }byte;
  118. size_of_pointer : byte;
  119. size_of_longint : byte;
  120. use_bound_instruction : boolean;
  121. use_function_relative_addresses : boolean;
  122. end;
  123. tasminfo = packed record
  124. id : tasm;
  125. idtxt : string[8];
  126. asmbin : string[8];
  127. asmcmd : string[50];
  128. externals : boolean;
  129. labelprefix : string[2];
  130. comment : string[2];
  131. end;
  132. tlinkinfo = packed record
  133. id : tlink;
  134. linkbin : string[8];
  135. linkcmd : string[127];
  136. binders : word;
  137. bindbin : array[1..2]of string[8];
  138. bindcmd : array[1..2]of string[127];
  139. stripopt : string[2];
  140. libpathprefix : string[13];
  141. libpathsuffix : string[2];
  142. groupstart : string[8];
  143. groupend : string[2];
  144. inputstart : string[8];
  145. inputend : string[2];
  146. libprefix : string[2];
  147. end;
  148. tarinfo = packed record
  149. id : tar;
  150. arbin : string[8];
  151. arcmd : string[50];
  152. end;
  153. tresinfo = packed record
  154. id : tres;
  155. resbin : string[8];
  156. rescmd : string[50];
  157. end;
  158. ttargetinfo = packed record
  159. target : ttarget;
  160. flags : set of ttargetflags;
  161. cpu : ttargetcpu;
  162. short_name : string[8];
  163. unit_env : string[12];
  164. system_unit : string[8];
  165. smartext,
  166. unitext,
  167. unitlibext,
  168. asmext,
  169. objext,
  170. resext,
  171. resobjext,
  172. exeext : string[4];
  173. os : tos;
  174. link : tlink;
  175. assem : tasm;
  176. ar : tar;
  177. res : tres;
  178. heapsize,
  179. maxheapsize,
  180. stacksize : longint;
  181. end;
  182. tasmmodeinfo=packed record
  183. id : tasmmode;
  184. idtxt : string[8];
  185. end;
  186. var
  187. target_cpu : ttargetcpu;
  188. target_info : ttargetinfo;
  189. target_os : tosinfo;
  190. target_asm : tasminfo;
  191. target_link : tlinkinfo;
  192. target_ar : tarinfo;
  193. target_res : tresinfo;
  194. source_os : tosinfo;
  195. function set_string_target(s : string) : boolean;
  196. function set_string_asm(s : string) : boolean;
  197. function set_string_asmmode(s:string;var t:tasmmode):boolean;
  198. procedure InitSystems;
  199. implementation
  200. const
  201. {****************************************************************************
  202. OS Info
  203. ****************************************************************************}
  204. os_infos : array[1..oscnt] of tosinfo = (
  205. (
  206. id : os_none;
  207. name : 'No operating system';
  208. shortname : 'none'
  209. ),
  210. (
  211. id : os_i386_go32v1;
  212. name : 'GO32 V1 DOS extender';
  213. shortname : 'go32v1';
  214. sharedlibext : '.dll';
  215. staticlibext : '.a';
  216. sourceext : '.pp';
  217. pasext : '.pas';
  218. exeext : ''; { No .exe, the linker only output a.out ! }
  219. scriptext : '.bat';
  220. libprefix : '';
  221. Cprefix : '_';
  222. newline : #13#10;
  223. endian : endian_little;
  224. stackalignment : 2;
  225. size_of_pointer : 4;
  226. size_of_longint : 4;
  227. use_bound_instruction : false;
  228. use_function_relative_addresses : true
  229. ),
  230. (
  231. id : os_i386_go32v2;
  232. name : 'GO32 V2 DOS extender';
  233. shortname : 'go32v2';
  234. sharedlibext : '.dll';
  235. staticlibext : '.a';
  236. sourceext : '.pp';
  237. pasext : '.pas';
  238. exeext : '.exe';
  239. scriptext : '.bat';
  240. libprefix : '';
  241. Cprefix : '_';
  242. newline : #13#10;
  243. endian : endian_little;
  244. stackalignment : 2;
  245. size_of_pointer : 4;
  246. size_of_longint : 4;
  247. use_bound_instruction : true;
  248. use_function_relative_addresses : true
  249. ),
  250. (
  251. id : os_i386_linux;
  252. name : 'Linux for i386';
  253. shortname : 'linux';
  254. sharedlibext : '.so';
  255. staticlibext : '.a';
  256. sourceext : '.pp';
  257. pasext : '.pas';
  258. exeext : '';
  259. scriptext : '.sh';
  260. libprefix : 'lib';
  261. Cprefix : '';
  262. newline : #10;
  263. endian : endian_little;
  264. stackalignment : 4;
  265. size_of_pointer : 4;
  266. size_of_longint : 4;
  267. use_bound_instruction : false;
  268. use_function_relative_addresses : true
  269. ),
  270. (
  271. id : os_i386_os2;
  272. name : 'OS/2 via EMX';
  273. shortname : 'os2';
  274. sharedlibext : '.ao2';
  275. staticlibext : '.ao2';
  276. sourceext : '.pas';
  277. pasext : '.pp';
  278. exeext : '.exe';
  279. scriptext : '.cmd';
  280. libprefix : '';
  281. Cprefix : '_';
  282. newline : #13#10;
  283. endian : endian_little;
  284. stackalignment : 2;
  285. size_of_pointer : 4;
  286. size_of_longint : 4;
  287. use_bound_instruction : false;
  288. use_function_relative_addresses : false
  289. ),
  290. (
  291. id : os_i386_win32;
  292. name : 'Win32 for i386';
  293. shortname : 'win32';
  294. sharedlibext : '.dll';
  295. staticlibext : '.aw';
  296. sourceext : '.pp';
  297. pasext : '.pas';
  298. exeext : '.exe';
  299. scriptext : '.bat';
  300. libprefix : 'lib';
  301. Cprefix : '_';
  302. newline : #13#10;
  303. endian : endian_little;
  304. stackalignment : 4;
  305. size_of_pointer : 4;
  306. size_of_longint : 4;
  307. use_bound_instruction : true;
  308. use_function_relative_addresses : true
  309. ),
  310. (
  311. id : os_m68k_amiga;
  312. name : 'Commodore Amiga';
  313. shortname : 'amiga';
  314. sharedlibext : '.library';
  315. staticlibext : '.a';
  316. sourceext : '.pp';
  317. pasext : '.pas';
  318. exeext : '';
  319. scriptext : '';
  320. libprefix : '';
  321. Cprefix : '_';
  322. newline : #10;
  323. endian : endian_big;
  324. stackalignment : 2;
  325. size_of_pointer : 4;
  326. size_of_longint : 4;
  327. use_bound_instruction : false;
  328. use_function_relative_addresses : false
  329. ),
  330. (
  331. id : os_m68k_atari;
  332. name : 'Atari ST/STE';
  333. shortname : 'atari';
  334. sharedlibext : '.dll';
  335. staticlibext : '.a';
  336. sourceext : '.pp';
  337. pasext : '.pas';
  338. exeext : '.tpp';
  339. scriptext : '';
  340. libprefix : '';
  341. Cprefix : '_';
  342. newline : #10;
  343. endian : endian_big;
  344. stackalignment : 2;
  345. size_of_pointer : 4;
  346. size_of_longint : 4;
  347. use_bound_instruction : false;
  348. use_function_relative_addresses : false
  349. ),
  350. (
  351. id : os_m68k_mac;
  352. name : 'Macintosh m68k';
  353. shortname : 'mac';
  354. sharedlibext : '.dll';
  355. staticlibext : '.a';
  356. sourceext : '.pp';
  357. pasext : '.pas';
  358. exeext : '.tpp';
  359. scriptext : '';
  360. libprefix : '';
  361. Cprefix : '_';
  362. newline : #13;
  363. endian : endian_big;
  364. stackalignment : 2;
  365. size_of_pointer : 4;
  366. size_of_longint : 4;
  367. use_bound_instruction : false;
  368. use_function_relative_addresses : false
  369. ),
  370. (
  371. id : os_m68k_linux;
  372. name : 'Linux for m68k';
  373. shortname : 'linux';
  374. sharedlibext : '.so';
  375. staticlibext : '.a';
  376. sourceext : '.pp';
  377. pasext : '.pas';
  378. exeext : '';
  379. scriptext : '.sh';
  380. libprefix : 'lib';
  381. Cprefix : '';
  382. newline : #10;
  383. endian : endian_big;
  384. stackalignment : 2;
  385. size_of_pointer : 4;
  386. size_of_longint : 4;
  387. use_bound_instruction : false;
  388. use_function_relative_addresses : true
  389. ),
  390. (
  391. id : os_m68k_palmos;
  392. name : 'PalmOS';
  393. shortname : 'palmos';
  394. sharedlibext : '.so';
  395. staticlibext : '.a';
  396. sourceext : '.pp';
  397. pasext : '.pas';
  398. exeext : '';
  399. scriptext : '.sh';
  400. libprefix : 'lib';
  401. Cprefix : '_';
  402. newline : #10;
  403. endian : endian_big;
  404. stackalignment : 2;
  405. size_of_pointer : 4;
  406. size_of_longint : 4;
  407. use_bound_instruction : false;
  408. use_function_relative_addresses : false
  409. )
  410. );
  411. {****************************************************************************
  412. Assembler Info
  413. ****************************************************************************}
  414. as_infos : array[1..asmcnt] of tasminfo = (
  415. (
  416. id : as_none;
  417. idtxt : 'no'
  418. )
  419. {$ifdef i386}
  420. ,(
  421. id : as_i386_as;
  422. idtxt : 'AS';
  423. asmbin : 'as';
  424. asmcmd : '-o $OBJ $ASM';
  425. externals : false;
  426. labelprefix : '.L';
  427. comment : '# '
  428. )
  429. ,(
  430. id : as_i386_as_aout;
  431. idtxt : 'AS_AOUT';
  432. asmbin : 'as';
  433. asmcmd : '-o $OBJ $ASM';
  434. externals : false;
  435. labelprefix : 'L';
  436. comment : '# '
  437. )
  438. ,(
  439. id : as_i386_asw;
  440. idtxt : 'ASW';
  441. asmbin : 'asw';
  442. asmcmd : '-o $OBJ $ASM';
  443. externals : false;
  444. labelprefix : '.L';
  445. comment : '# '
  446. )
  447. ,(
  448. id : as_i386_nasmcoff;
  449. idtxt : 'NASMCOFF';
  450. asmbin : 'nasm';
  451. asmcmd : '-f coff -o $OBJ $ASM';
  452. externals : true;
  453. labelprefix : 'L';
  454. comment : '; '
  455. )
  456. ,(
  457. id : as_i386_nasmelf;
  458. idtxt : 'NASMELF';
  459. asmbin : 'nasm';
  460. asmcmd : '-f elf -o $OBJ $ASM';
  461. externals : true;
  462. labelprefix : 'L';
  463. comment : '; '
  464. )
  465. ,(
  466. id : as_i386_nasmobj;
  467. idtxt : 'NASMOBJ';
  468. asmbin : 'nasm';
  469. asmcmd : '-f obj -o $OBJ $ASM';
  470. externals : true;
  471. labelprefix : 'L';
  472. comment : '; '
  473. )
  474. ,(
  475. id : as_i386_tasm;
  476. idtxt : 'TASM';
  477. asmbin : 'tasm';
  478. asmcmd : '/m2 $ASM $OBJ';
  479. externals : true;
  480. labelprefix : 'L';
  481. comment : '; '
  482. )
  483. ,(
  484. id : as_i386_masm;
  485. idtxt : 'MASM';
  486. asmbin : 'masm';
  487. asmcmd : '$ASM $OBJ';
  488. externals : true;
  489. labelprefix : '.L';
  490. comment : '; '
  491. )
  492. ,(
  493. id : as_i386_dbg;
  494. idtxt : 'DBG';
  495. asmbin : '';
  496. asmcmd : '';
  497. externals : true;
  498. labelprefix : 'L';
  499. comment : ''
  500. )
  501. ,(
  502. id : as_i386_coff;
  503. idtxt : 'COFF';
  504. asmbin : '';
  505. asmcmd : '';
  506. externals : true;
  507. labelprefix : 'L';
  508. comment : ''
  509. )
  510. ,(
  511. id : as_i386_pecoff;
  512. idtxt : 'PECOFF';
  513. asmbin : '';
  514. asmcmd : '';
  515. externals : true;
  516. labelprefix : 'L';
  517. comment : ''
  518. )
  519. {$endif i386}
  520. {$ifdef m68k}
  521. ,(
  522. id : as_m68k_as;
  523. idtxt : 'AS';
  524. asmbin : 'as';
  525. asmcmd : '-o $OBJ $ASM';
  526. externals : false;
  527. labelprefix : '.L';
  528. comment : '# '
  529. )
  530. ,(
  531. id : as_m68k_gas;
  532. idtxt : 'GAS';
  533. asmbin : 'as68k'; { Gas for the Amiga}
  534. asmcmd : '--register-prefix-optional -o $OBJ $ASM';
  535. externals : false;
  536. labelprefix : '.L';
  537. comment : '| '
  538. )
  539. ,(
  540. id : as_m68k_mit;
  541. idtxt : 'MIT';
  542. asmbin : '';
  543. asmcmd : '-o $OBJ $ASM';
  544. externals : false;
  545. labelprefix : '.L';
  546. comment : '| '
  547. )
  548. ,(
  549. id : as_m68k_mot;
  550. idtxt : 'MOT';
  551. asmbin : '';
  552. asmcmd : '-o $OBJ $ASM';
  553. externals : false;
  554. labelprefix : '__L';
  555. comment : '| '
  556. )
  557. ,(
  558. id : as_m68k_mpw;
  559. idtxt : 'MPW';
  560. asmbin : '';
  561. asmcmd : '-model far -o $OBJ $ASM';
  562. externals : false;
  563. labelprefix : '__L';
  564. comment : '| '
  565. )
  566. {$endif m68k}
  567. );
  568. {****************************************************************************
  569. Linker Info
  570. ****************************************************************************}
  571. link_infos : array[1..linkcnt] of tlinkinfo = (
  572. (
  573. id : link_none
  574. )
  575. {$ifdef i386}
  576. ,(
  577. id : link_i386_ld;
  578. linkbin : 'ld';
  579. linkcmd : '$OPT -o $EXE $RES';
  580. binders : 0;
  581. bindbin : ('','');
  582. bindcmd : ('','');
  583. stripopt : '-s';
  584. libpathprefix : 'SEARCH_DIR(';
  585. libpathsuffix : ')';
  586. groupstart : 'GROUP(';
  587. groupend : ')';
  588. inputstart : 'INPUT(';
  589. inputend : ')';
  590. libprefix : '-l'
  591. )
  592. ,(
  593. id : link_i386_ldgo32v1;
  594. linkbin : 'ld';
  595. linkcmd : '-oformat coff-go32 $OPT -o $EXE @$RES';
  596. binders : 1;
  597. bindbin : ('aout2exe','');
  598. bindcmd : ('$EXE','');
  599. stripopt : '-s';
  600. libpathprefix : '-L';
  601. libpathsuffix : '';
  602. groupstart : '-(';
  603. groupend : '-)';
  604. inputstart : '';
  605. inputend : '';
  606. libprefix : '-l'
  607. )
  608. ,(
  609. id : link_i386_ldgo32v2;
  610. linkbin : 'ld';
  611. linkcmd : '-oformat coff-go32-exe $OPT -o $EXE @$RES';
  612. binders:0;
  613. bindbin : ('','');
  614. bindcmd : ('','');
  615. stripopt : '-s';
  616. libpathprefix : '-L';
  617. libpathsuffix : '';
  618. groupstart : '-(';
  619. groupend : '-)';
  620. inputstart : '';
  621. inputend : '';
  622. libprefix : '-l'
  623. )
  624. ,(
  625. id : link_i386_ldw;
  626. linkbin : 'ldw';
  627. linkcmd : '$OPT -o $EXE $RES';
  628. binders : 0;
  629. bindbin : ('dlltool','ldw');
  630. bindcmd : ('--as asw.exe --dllname $EXE --output-exp exp.$$$',
  631. '-s $OPT -o $EXE $RES exp.$$$');
  632. stripopt : '-s';
  633. libpathprefix : 'SEARCH_DIR(';
  634. libpathsuffix : ')';
  635. groupstart : 'GROUP(';
  636. groupend : ')';
  637. inputstart : 'INPUT(';
  638. inputend : ')';
  639. libprefix : '-l'
  640. )
  641. ,(
  642. id : link_i386_ldos2;
  643. linkbin : 'ld'; { Os/2 }
  644. linkcmd : '-o $EXE @$RES';
  645. binders : 1;
  646. bindbin : ('emxbind','');
  647. bindcmd : ('-b -k$STACKKB -h$HEAPMB -o $EXE.exe $EXE -aim -s$DOSHEAPKB','');
  648. stripopt : '-s';
  649. libpathprefix : '-L';
  650. libpathsuffix : '';
  651. groupstart : ''; {Linker is too primitive...}
  652. groupend : '';
  653. inputstart : '';
  654. inputend : '';
  655. libprefix : '-l'
  656. )
  657. {$endif i386}
  658. {$ifdef m68k}
  659. ,(
  660. id : link_m68k_ld;
  661. linkbin : 'ld';
  662. linkcmd : '$OPT -o $EXE $RES';
  663. binders:0;
  664. bindbin : ('','');
  665. bindcmd : ('','');
  666. stripopt : '-s';
  667. libpathprefix : 'SEARCH_DIR(';
  668. libpathsuffix : ')';
  669. groupstart : 'GROUP(';
  670. groupend : ')';
  671. inputstart : 'INPUT(';
  672. inputend : ')';
  673. libprefix : '-l'
  674. )
  675. {$endif m68k}
  676. );
  677. {****************************************************************************
  678. Ar Info
  679. ****************************************************************************}
  680. ar_infos : array[1..arcnt] of tarinfo = (
  681. (
  682. id : ar_none
  683. )
  684. {$ifdef i386}
  685. ,(
  686. id : ar_i386_ar;
  687. arbin : 'ar';
  688. arcmd : 'rs $LIB $FILES'
  689. ),
  690. (
  691. id : ar_i386_arw;
  692. arbin : 'arw';
  693. arcmd : 'rs $LIB $FILES'
  694. )
  695. {$endif i386}
  696. {$ifdef m68k}
  697. ,(
  698. id : ar_m68k_ar;
  699. arbin : 'ar';
  700. arcmd : 'rs $LIB $FILES'
  701. )
  702. {$endif m68k}
  703. );
  704. {****************************************************************************
  705. Res Info
  706. ****************************************************************************}
  707. res_infos : array[1..rescnt] of tresinfo = (
  708. (
  709. id : res_none
  710. )
  711. {$ifdef i386}
  712. ,(
  713. id : res_i386_windres;
  714. resbin : 'windres';
  715. rescmd : '--include $INC -O coff -o $OBJ $RES'
  716. )
  717. {$endif i386}
  718. );
  719. {****************************************************************************
  720. Targets Info
  721. ****************************************************************************}
  722. target_infos : array[1..targetcnt] of ttargetinfo = (
  723. (
  724. target : target_none;
  725. flags : [];
  726. cpu : no_cpu;
  727. short_name : 'notarget'
  728. )
  729. {$ifdef i386}
  730. ,(
  731. target : target_i386_GO32V1;
  732. flags : [];
  733. cpu : i386;
  734. short_name : 'GO32V1';
  735. unit_env : 'GO32V1UNITS';
  736. system_unit : 'SYSTEM';
  737. smartext : '.sl';
  738. unitext : '.pp1';
  739. unitlibext : '.ppl';
  740. asmext : '.s1';
  741. objext : '.o1';
  742. resext : '.res';
  743. resobjext : '.o1r';
  744. exeext : ''; { The linker produces a.out }
  745. os : os_i386_GO32V1;
  746. link : link_i386_ldgo32v1;
  747. assem : as_i386_as;
  748. ar : ar_i386_ar;
  749. res : res_none;
  750. heapsize : 2048*1024;
  751. maxheapsize : 32768*1024;
  752. stacksize : 16384
  753. ),
  754. (
  755. target : target_i386_GO32V2;
  756. flags : [];
  757. cpu : i386;
  758. short_name : 'GO32V2';
  759. unit_env : 'GO32V2UNITS';
  760. system_unit : 'SYSTEM';
  761. smartext : '.sl';
  762. unitext : '.ppu';
  763. unitlibext : '.ppl';
  764. asmext : '.s';
  765. objext : '.o';
  766. resext : '.res';
  767. resobjext : '.or';
  768. exeext : '.exe';
  769. os : os_i386_GO32V2;
  770. link : link_i386_ldgo32v2;
  771. {$ifdef Ag386Bin}
  772. assem : as_i386_coff;
  773. {$else}
  774. assem : as_i386_as;
  775. {$endif}
  776. ar : ar_i386_ar;
  777. res : res_none;
  778. heapsize : 2048*1024;
  779. maxheapsize : 32768*1024;
  780. stacksize : 16384
  781. ),
  782. (
  783. target : target_i386_LINUX;
  784. flags : [];
  785. cpu : i386;
  786. short_name : 'LINUX';
  787. unit_env : 'LINUXUNITS';
  788. system_unit : 'syslinux';
  789. smartext : '.sl';
  790. unitext : '.ppu';
  791. unitlibext : '.ppl';
  792. asmext : '.s';
  793. objext : '.o';
  794. resext : '.res';
  795. resobjext : '.or';
  796. exeext : '';
  797. os : os_i386_Linux;
  798. link : link_i386_ld;
  799. assem : as_i386_as;
  800. ar : ar_i386_ar;
  801. res : res_none;
  802. heapsize : 2048*1024;
  803. maxheapsize : 32768*1024;
  804. stacksize : 8192
  805. ),
  806. (
  807. target : target_i386_OS2;
  808. flags : [];
  809. cpu : i386;
  810. short_name : 'OS2';
  811. unit_env : 'OS2UNITS';
  812. system_unit : 'SYSOS2';
  813. smartext : '.sl';
  814. unitext : '.ppo';
  815. unitlibext : '.ppl';
  816. asmext : '.so2';
  817. objext : '.oo2';
  818. resext : '.res';
  819. resobjext : '.oor';
  820. exeext : ''; { The linker produces a.out }
  821. os : os_i386_OS2;
  822. link : link_i386_ldos2;
  823. assem : as_i386_as_aout;
  824. ar : ar_i386_ar;
  825. res : res_none;
  826. heapsize : 256*1024;
  827. maxheapsize : 32768*1024;
  828. stacksize : 32768
  829. ),
  830. (
  831. target : target_i386_WIN32;
  832. flags : [];
  833. cpu : i386;
  834. short_name : 'WIN32';
  835. unit_env : 'WIN32UNITS';
  836. system_unit : 'SYSWIN32';
  837. smartext : '.slw';
  838. unitext : '.ppw';
  839. unitlibext : '.ppl';
  840. asmext : '.sw';
  841. objext : '.ow';
  842. resext : '.rc';
  843. resobjext : '.owr';
  844. exeext : '.exe';
  845. os : os_i386_Win32;
  846. link : link_i386_ldw;
  847. assem : as_i386_asw;
  848. ar : ar_i386_arw;
  849. res : res_i386_windres;
  850. heapsize : 2048*1024;
  851. maxheapsize : 32768*1024;
  852. stacksize : 32768
  853. )
  854. {$endif i386}
  855. {$ifdef m68k}
  856. ,(
  857. target : target_m68k_Amiga;
  858. flags : [];
  859. cpu : m68k;
  860. short_name : 'AMIGA';
  861. unit_env : '';
  862. system_unit : 'sysamiga';
  863. smartext : '.sl';
  864. unitext : '.ppa';
  865. unitlibext : '.ppl';
  866. asmext : '.asm';
  867. objext : '.o';
  868. resext : '.res';
  869. resobjext : '.or';
  870. exeext : '';
  871. os : os_m68k_Amiga;
  872. link : link_m68k_ld;
  873. assem : as_m68k_o;
  874. ar : ar_m68k_ar;
  875. res : res_none;
  876. heapsize : 128*1024;
  877. maxheapsize : 32768*1024;
  878. stacksize : 8192
  879. ),
  880. (
  881. target : target_m68k_Atari;
  882. flags : [];
  883. cpu : m68k;
  884. short_name : 'ATARI';
  885. unit_env : '';
  886. system_unit : 'SYSATARI';
  887. smartext : '.sl';
  888. unitext : '.ppt';
  889. unitlibext : '.ppl';
  890. asmext : '.s';
  891. objext : '.o';
  892. resext : '.res';
  893. resobjext : '.or';
  894. exeext : '.ttp';
  895. os : os_m68k_Atari;
  896. link : link_m68k_ld;
  897. assem : as_m68k_o;
  898. ar : ar_m68k_ar;
  899. res : res_none;
  900. heapsize : 16*1024;
  901. maxheapsize : 32768*1024;
  902. stacksize : 8192
  903. ),
  904. (
  905. target : target_m68k_Mac;
  906. flags : [];
  907. cpu : m68k;
  908. short_name : 'MACOS';
  909. unit_env : '';
  910. system_unit : 'sysmac';
  911. smartext : '.sl';
  912. unitext : '.ppt';
  913. unitlibext : '.ppl';
  914. asmext : '.a';
  915. objext : '.o';
  916. resext : '.res';
  917. resobjext : '.or';
  918. exeext : '';
  919. os : os_m68k_Mac;
  920. link : link_m68k_ld;
  921. assem : as_m68k_mpw;
  922. ar : ar_m68k_ar;
  923. res : res_none;
  924. heapsize : 128*1024;
  925. maxheapsize : 32768*1024;
  926. stacksize : 8192
  927. ),
  928. (
  929. target : target_m68k_linux;
  930. flags : [];
  931. cpu : m68k;
  932. short_name : 'LINUX';
  933. unit_env : 'LINUXUNITS';
  934. system_unit : 'syslinux';
  935. smartext : '.sl';
  936. unitext : '.ppu';
  937. unitlibext : '.ppl';
  938. asmext : '.s';
  939. objext : '.o';
  940. resext : '.res';
  941. resobjext : '.or';
  942. exeext : '';
  943. os : os_m68k_Linux;
  944. link : link_m68k_ld;
  945. assem : as_m68k_o;
  946. ar : ar_m68k_ar;
  947. res : res_none;
  948. heapsize : 128*1024;
  949. maxheapsize : 32768*1024;
  950. stacksize : 8192
  951. ),
  952. (
  953. target : target_m68k_PalmOS;
  954. flags : [];
  955. cpu : m68k;
  956. short_name : 'PALMOS';
  957. unit_env : 'PALMUNITS';
  958. system_unit : 'syspalm';
  959. smartext : '.sl';
  960. unitext : '.ppu';
  961. unitlibext : '.ppl';
  962. asmext : '.s';
  963. objext : '.o';
  964. resext : '.res';
  965. resobjext : '.or';
  966. exeext : '';
  967. os : os_m68k_PalmOS;
  968. link : link_m68k_ld;
  969. assem : as_m68k_o;
  970. ar : ar_m68k_ar;
  971. res : res_none;
  972. heapsize : 128*1024;
  973. maxheapsize : 32768*1024;
  974. stacksize : 8192
  975. )
  976. {$endif m68k}
  977. );
  978. {****************************************************************************
  979. AsmModeInfo
  980. ****************************************************************************}
  981. asmmodeinfos : array[1..asmmodecnt] of tasmmodeinfo = (
  982. (
  983. id : asmmode_none;
  984. idtxt : 'none'
  985. )
  986. {$ifdef i386}
  987. ,(
  988. id : asmmode_i386_direct;
  989. idtxt : 'DIRECT'
  990. ),
  991. (
  992. id : asmmode_i386_att;
  993. idtxt : 'ATT'
  994. ),
  995. (
  996. id : asmmode_i386_intel;
  997. idtxt : 'INTEL'
  998. )
  999. {$endif i386}
  1000. {$ifdef m68k}
  1001. ,(
  1002. id : asmmode_m68k_mot;
  1003. idtxt : 'MOT'
  1004. )
  1005. {$endif m68k}
  1006. );
  1007. {****************************************************************************
  1008. Helpers
  1009. ****************************************************************************}
  1010. function upper(const s : string) : string;
  1011. var
  1012. i : longint;
  1013. begin
  1014. for i:=1 to length(s) do
  1015. if s[i] in ['a'..'z'] then
  1016. upper[i]:=char(byte(s[i])-32)
  1017. else
  1018. upper[i]:=s[i];
  1019. {$ifndef TP}
  1020. {$ifopt H+}
  1021. SetLength(upper,length(s));
  1022. {$else}
  1023. upper[0]:=s[0];
  1024. {$endif}
  1025. {$else}
  1026. upper[0]:=s[0];
  1027. {$endif}
  1028. end;
  1029. function set_target_os(t:tos):boolean;
  1030. var
  1031. i : longint;
  1032. begin
  1033. set_target_os:=false;
  1034. { target 1 is none }
  1035. for i:=2 to oscnt do
  1036. if os_infos[i].id=t then
  1037. begin
  1038. target_os:=os_infos[i];
  1039. set_target_os:=true;
  1040. exit;
  1041. end;
  1042. end;
  1043. function set_target_asm(t:tasm):boolean;
  1044. var
  1045. i : longint;
  1046. begin
  1047. set_target_asm:=false;
  1048. for i:=1 to asmcnt do
  1049. if as_infos[i].id=t then
  1050. begin
  1051. target_asm:=as_infos[i];
  1052. set_target_asm:=true;
  1053. exit;
  1054. end;
  1055. end;
  1056. function set_target_link(t:tlink):boolean;
  1057. var
  1058. i : longint;
  1059. begin
  1060. set_target_link:=false;
  1061. for i:=1 to linkcnt do
  1062. if link_infos[i].id=t then
  1063. begin
  1064. target_link:=link_infos[i];
  1065. set_target_link:=true;
  1066. exit;
  1067. end;
  1068. end;
  1069. function set_target_ar(t:tar):boolean;
  1070. var
  1071. i : longint;
  1072. begin
  1073. set_target_ar:=false;
  1074. for i:=1 to arcnt do
  1075. if ar_infos[i].id=t then
  1076. begin
  1077. target_ar:=ar_infos[i];
  1078. set_target_ar:=true;
  1079. exit;
  1080. end;
  1081. end;
  1082. function set_target_res(t:tres):boolean;
  1083. var
  1084. i : longint;
  1085. begin
  1086. set_target_res:=false;
  1087. for i:=1 to rescnt do
  1088. if res_infos[i].id=t then
  1089. begin
  1090. target_res:=res_infos[i];
  1091. set_target_res:=true;
  1092. exit;
  1093. end;
  1094. end;
  1095. function set_target_info(t:ttarget):boolean;
  1096. var
  1097. i : longint;
  1098. begin
  1099. set_target_info:=false;
  1100. for i:=1 to targetcnt do
  1101. if target_infos[i].target=t then
  1102. begin
  1103. target_info:=target_infos[i];
  1104. set_target_os(target_info.os);
  1105. set_target_asm(target_info.assem);
  1106. set_target_link(target_info.link);
  1107. set_target_ar(target_info.ar);
  1108. set_target_res(target_info.res);
  1109. target_cpu:=target_info.cpu;
  1110. set_target_info:=true;
  1111. exit;
  1112. end;
  1113. end;
  1114. {****************************************************************************
  1115. Load from string
  1116. ****************************************************************************}
  1117. function set_string_target(s : string) : boolean;
  1118. var
  1119. i : longint;
  1120. begin
  1121. set_string_target:=false;
  1122. { this should be case insensitive !! PM }
  1123. s:=upper(s);
  1124. for i:=1 to targetcnt do
  1125. if target_infos[i].short_name=s then
  1126. begin
  1127. target_info:=target_infos[i];
  1128. set_target_os(target_info.os);
  1129. set_target_asm(target_info.assem);
  1130. set_target_link(target_info.link);
  1131. set_target_ar(target_info.ar);
  1132. set_target_res(target_info.res);
  1133. target_cpu:=target_info.cpu;
  1134. set_string_target:=true;
  1135. exit;
  1136. end;
  1137. end;
  1138. function set_string_asm(s : string) : boolean;
  1139. var
  1140. i : longint;
  1141. begin
  1142. set_string_asm:=false;
  1143. { this should be case insensitive !! PM }
  1144. s:=upper(s);
  1145. for i:=1 to asmcnt do
  1146. if as_infos[i].idtxt=s then
  1147. begin
  1148. target_asm:=as_infos[i];
  1149. set_string_asm:=true;
  1150. end;
  1151. end;
  1152. function set_string_asmmode(s:string;var t:tasmmode):boolean;
  1153. var
  1154. i : longint;
  1155. begin
  1156. set_string_asmmode:=false;
  1157. { this should be case insensitive !! PM }
  1158. s:=upper(s);
  1159. for i:=1 to asmmodecnt do
  1160. if asmmodeinfos[i].idtxt=s then
  1161. begin
  1162. t:=asmmodeinfos[i].id;
  1163. set_string_asmmode:=true;
  1164. end;
  1165. end;
  1166. {****************************************************************************
  1167. Initialization of default target
  1168. ****************************************************************************}
  1169. procedure default_os(t:ttarget);
  1170. begin
  1171. set_target_info(t);
  1172. if source_os.name='' then
  1173. source_os:=target_os;
  1174. end;
  1175. procedure set_source_os(t:tos);
  1176. var
  1177. i : longint;
  1178. begin
  1179. { can't use message() here (PFV) }
  1180. if source_os.name<>'' then
  1181. Writeln('Warning: Source OS Redefined!');
  1182. for i:=1 to oscnt do
  1183. if os_infos[i].id=t then
  1184. begin
  1185. source_os:=os_infos[i];
  1186. exit;
  1187. end;
  1188. end;
  1189. procedure InitSystems;
  1190. begin
  1191. { first get source OS }
  1192. source_os.name:='';
  1193. { please note then we use cpu86 and cpu68 here on purpose !! }
  1194. {$ifdef cpu86}
  1195. {$ifdef GO32V1}
  1196. set_source_os(os_i386_GO32V1);
  1197. {$else}
  1198. {$ifdef GO32V2}
  1199. set_source_os(os_i386_GO32V2);
  1200. {$else}
  1201. {$ifdef OS2}
  1202. set_source_os(os_i386_OS2);
  1203. {$else}
  1204. {$ifdef LINUX}
  1205. set_source_os(os_i386_LINUX);
  1206. {$else}
  1207. {$ifdef WIN32}
  1208. set_source_os(os_i386_WIN32);
  1209. {$endif win32}
  1210. {$endif linux}
  1211. {$endif os2}
  1212. {$endif go32v2}
  1213. {$endif go32v1}
  1214. {$endif cpu86}
  1215. {$ifdef cpu68}
  1216. {$ifdef AMIGA}
  1217. set_source_os(os_m68k_Amiga);
  1218. {$else}
  1219. {$ifdef ATARI}
  1220. set_source_os(os_m68k_Atari);
  1221. {$else}
  1222. {$ifdef MACOS}
  1223. set_source_os(os_m68k_MAC);
  1224. {$else}
  1225. {$ifdef LINUX}
  1226. set_source_os(os_m68k_linux);
  1227. {$endif linux}
  1228. {$endif macos}
  1229. {$endif atari}
  1230. {$endif amiga}
  1231. {$endif cpu68}
  1232. { Now default target !! }
  1233. {$ifdef i386}
  1234. {$ifdef GO32V1}
  1235. default_os(target_i386_GO32V1);
  1236. {$else}
  1237. {$ifdef GO32V2}
  1238. default_os(target_i386_GO32V2);
  1239. {$else}
  1240. {$ifdef OS2}
  1241. default_os(target_i386_OS2);
  1242. {$else}
  1243. {$ifdef LINUX}
  1244. default_os(target_i386_LINUX);
  1245. {$else}
  1246. {$ifdef WIN32}
  1247. default_os(target_i386_WIN32);
  1248. {$else}
  1249. default_os(target_i386_GO32V2);
  1250. {$endif win32}
  1251. {$endif linux}
  1252. {$endif os2}
  1253. {$endif go32v2}
  1254. {$endif go32v1}
  1255. {$endif i386}
  1256. {$ifdef m68k}
  1257. {$ifdef AMIGA}
  1258. default_os(target_m68k_Amiga);
  1259. {$else}
  1260. {$ifdef ATARI}
  1261. default_os(target_m68k_Atari);
  1262. {$else}
  1263. {$ifdef MACOS}
  1264. default_os(target_m68k_Mac);
  1265. {$else}
  1266. {$ifdef LINUX}
  1267. default_os(target_m68k_linux);
  1268. {$else}
  1269. default_os(target_m68k_Amiga);
  1270. {$endif linux}
  1271. {$endif macos}
  1272. {$endif atari}
  1273. {$endif amiga}
  1274. {$endif m68k}
  1275. end;
  1276. begin
  1277. InitSystems;
  1278. end.
  1279. {
  1280. $Log$
  1281. Revision 1.60 1999-02-26 00:48:25 peter
  1282. * assembler writers fixed for ag386bin
  1283. Revision 1.59 1999/02/25 21:02:53 peter
  1284. * ag386bin updates
  1285. + coff writer
  1286. Revision 1.58 1999/02/24 00:59:16 peter
  1287. * small updates for ag386bin
  1288. Revision 1.57 1999/02/22 02:15:42 peter
  1289. * updates for ag386bin
  1290. Revision 1.56 1999/01/10 15:38:01 peter
  1291. * moved some tables from ra386*.pas -> i386.pas
  1292. + start of coff writer
  1293. * renamed asmutils unit to rautils
  1294. Revision 1.55 1999/01/06 22:58:47 florian
  1295. + some stuff for the new code generator
  1296. Revision 1.54 1998/12/28 23:26:26 peter
  1297. + resource file handling ($R directive) for Win32
  1298. Revision 1.53 1998/12/15 10:23:30 peter
  1299. + -iSO, -iSP, -iTO, -iTP
  1300. Revision 1.52 1998/12/03 10:17:32 peter
  1301. * target_os.use_bound_instruction boolean
  1302. Revision 1.51 1998/11/30 09:43:23 pierre
  1303. * some range check bugs fixed (still not working !)
  1304. + added DLL writing support for win32 (also accepts variables)
  1305. + TempAnsi for code that could be used for Temporary ansi strings
  1306. handling
  1307. Revision 1.50 1998/11/16 15:41:45 peter
  1308. * tp7 didn't like my ifopt H+ :(
  1309. Revision 1.49 1998/11/16 10:17:09 peter
  1310. * fixed for H+ compilation
  1311. Revision 1.48 1998/10/26 14:19:30 pierre
  1312. + added options -lS and -lT for source and target os output
  1313. (to have a easier way to test OS_SOURCE abd OS_TARGET in makefiles)
  1314. * several problems with rtti data
  1315. (type of sym was not checked)
  1316. assumed to be varsym when they could be procsym or property syms !!
  1317. Revision 1.47 1998/10/20 08:07:04 pierre
  1318. * several memory corruptions due to double freemem solved
  1319. => never use p^.loc.location:=p^.left^.loc.location;
  1320. + finally I added now by default
  1321. that ra386dir translates global and unit symbols
  1322. + added a first field in tsymtable and
  1323. a nextsym field in tsym
  1324. (this allows to obtain ordered type info for
  1325. records and objects in gdb !)
  1326. Revision 1.46 1998/10/16 08:51:54 peter
  1327. + target_os.stackalignment
  1328. + stack can be aligned at 2 or 4 byte boundaries
  1329. Revision 1.45 1998/10/15 16:20:41 peter
  1330. * removed uses verbose which is not possible! this unit may not use
  1331. any other unit !
  1332. Revision 1.44 1998/10/14 11:28:25 florian
  1333. * emitpushreferenceaddress gets now the asmlist as parameter
  1334. * m68k version compiles with -duseansistrings
  1335. Revision 1.43 1998/10/14 08:08:56 pierre
  1336. * following Peters remark, removed all ifdef in
  1337. the systems unit enums
  1338. * last bugs of cg68k removed for sysamiga
  1339. (sysamiga assembles with as68k !!)
  1340. Revision 1.42 1998/10/13 16:50:23 pierre
  1341. * undid some changes of Peter that made the compiler wrong
  1342. for m68k (I had to reinsert some ifdefs)
  1343. * removed several memory leaks under m68k
  1344. * removed the meory leaks for assembler readers
  1345. * cross compiling shoud work again better
  1346. ( crosscompiling sysamiga works
  1347. but as68k still complain about some code !)
  1348. Revision 1.41 1998/10/13 13:10:31 peter
  1349. * new style for m68k/i386 infos and enums
  1350. Revision 1.40 1998/10/13 09:13:09 pierre
  1351. * assembler type output command line was case sensitive
  1352. Revision 1.39 1998/10/13 08:19:42 pierre
  1353. + source_os is now set correctly for cross-processor compilers
  1354. (tos contains all target_infos and
  1355. we use CPU86 and CPU68 conditionnals to
  1356. get the source operating system
  1357. this only works if you do not undefine
  1358. the source target !!)
  1359. * several cg68k memory leaks fixed
  1360. + started to change the code so that it should be possible to have
  1361. a complete compiler (both for m68k and i386 !!)
  1362. Revision 1.38 1998/10/07 04:26:58 carl
  1363. * bugfixes
  1364. + added mpw support
  1365. Revision 1.37 1998/10/06 20:40:58 peter
  1366. * remove -D from assemblers
  1367. Revision 1.36 1998/09/16 16:41:50 peter
  1368. * merged fixes
  1369. Revision 1.33.2.3 1998/09/16 16:13:13 peter
  1370. * win32 .o -> .ow and .a -> .aw
  1371. Revision 1.35 1998/09/11 17:35:33 peter
  1372. * fixed tabs
  1373. Revision 1.34 1998/09/11 12:27:55 pierre
  1374. * restored m68k part
  1375. Revision 1.33.2.2 1998/09/11 17:29:20 peter
  1376. * fixed tabs
  1377. Revision 1.33.2.1 1998/09/11 12:06:00 pierre
  1378. * m68k part restored
  1379. Revision 1.33 1998/09/10 15:25:39 daniel
  1380. + Added maxheapsize.
  1381. * Corrected semi-bug in calling the assembler and the linker
  1382. Revision 1.31 1998/09/01 09:07:13 peter
  1383. * m68k fixes, splitted cg68k like cgi386
  1384. Revision 1.30 1998/08/31 12:26:34 peter
  1385. * m68k and palmos updates from surebugfixes
  1386. Revision 1.29 1998/08/26 10:09:21 peter
  1387. * more lowercase extensions
  1388. Revision 1.28 1998/08/25 12:42:47 pierre
  1389. * CDECL changed to CVAR for variables
  1390. specifications are read in structures also
  1391. + started adding GPC compatibility mode ( option -Sp)
  1392. * names changed to lowercase
  1393. Revision 1.27 1998/08/21 15:16:57 peter
  1394. * win32 compiles a bit better, no growheap crash
  1395. Revision 1.26 1998/08/19 16:07:55 jonas
  1396. * changed optimizer switches + cleanup of DestroyRefs in daopt386.pas
  1397. Revision 1.25 1998/08/18 09:24:45 pierre
  1398. * small warning position bug fixed
  1399. * support_mmx switches splitting was missing
  1400. * rhide error and warning output corrected
  1401. Revision 1.24 1998/08/17 09:17:54 peter
  1402. * static/shared linking updates
  1403. Revision 1.23 1998/06/25 08:48:20 florian
  1404. * first version of rtti support
  1405. Revision 1.22 1998/06/17 14:10:21 peter
  1406. * small os2 fixes
  1407. * fixed interdependent units with newppu (remake3 under linux works now)
  1408. Revision 1.20 1998/06/15 15:38:14 pierre
  1409. * small bug in systems.pas corrected
  1410. + operators in different units better hanlded
  1411. Revision 1.19 1998/06/15 13:34:24 daniel
  1412. * Fixed spelling mistakes in comments.
  1413. * Fixed some OS/2 parameters.
  1414. Revision 1.18 1998/06/08 22:59:54 peter
  1415. * smartlinking works for win32
  1416. * some defines to exclude some compiler parts
  1417. Revision 1.17 1998/06/04 23:52:04 peter
  1418. * m68k compiles
  1419. + .def file creation moved to gendef.pas so it could also be used
  1420. for win32
  1421. Revision 1.16 1998/06/01 16:50:22 peter
  1422. + boolean -> ord conversion
  1423. * fixed ord -> boolean conversion
  1424. Revision 1.15 1998/05/30 14:31:11 peter
  1425. + $ASMMODE
  1426. Revision 1.14 1998/05/29 13:24:45 peter
  1427. + asw assembler
  1428. Revision 1.13 1998/05/27 00:20:33 peter
  1429. * some scanner optimizes
  1430. * automaticly aout2exe for go32v1
  1431. * fixed dynamiclinker option which was added at the wrong place
  1432. Revision 1.12 1998/05/23 01:21:32 peter
  1433. + aktasmmode, aktoptprocessor, aktoutputformat
  1434. + smartlink per module $SMARTLINK-/+ (like MMX) and moved to aktswitches
  1435. + $LIBNAME to set the library name where the unit will be put in
  1436. * splitted cgi386 a bit (codeseg to large for bp7)
  1437. * nasm, tasm works again. nasm moved to ag386nsm.pas
  1438. Revision 1.11 1998/05/22 12:32:49 peter
  1439. * fixed -L on the commandline, Dos commandline is only 128 bytes
  1440. Revision 1.10 1998/05/11 13:07:58 peter
  1441. + $ifdef NEWPPU for the new ppuformat
  1442. + $define GDB not longer required
  1443. * removed all warnings and stripped some log comments
  1444. * no findfirst/findnext anymore to remove smartlink *.o files
  1445. Revision 1.9 1998/05/06 08:38:49 pierre
  1446. * better position info with UseTokenInfo
  1447. UseTokenInfo greatly simplified
  1448. + added check for changed tree after first time firstpass
  1449. (if we could remove all the cases were it happen
  1450. we could skip all firstpass if firstpasscount > 1)
  1451. Only with ExtDebug
  1452. Revision 1.8 1998/05/04 20:19:54 peter
  1453. * small fix for go32v2
  1454. Revision 1.7 1998/05/04 17:54:29 peter
  1455. + smartlinking works (only case jumptable left todo)
  1456. * redesign of systems.pas to support assemblers and linkers
  1457. + Unitname is now also in the PPU-file, increased version to 14
  1458. Revision 1.6 1998/05/01 07:43:57 florian
  1459. + basics for rtti implemented
  1460. + switch $m (generate rtti for published sections)
  1461. Revision 1.5 1998/04/29 10:34:06 pierre
  1462. + added some code for ansistring (not complete nor working yet)
  1463. * corrected operator overloading
  1464. * corrected nasm output
  1465. + started inline procedures
  1466. + added starstarn : use ** for exponentiation (^ gave problems)
  1467. + started UseTokenInfo cond to get accurate positions
  1468. Revision 1.4 1998/04/27 15:45:20 peter
  1469. + -Xl for smartlink
  1470. + target_info.arext = .a
  1471. Revision 1.3 1998/04/16 10:50:45 daniel
  1472. * Fixed some things that were broken for OS/2.
  1473. }