systems.pas 48 KB

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