2
0

systems.pas 46 KB

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