systems.pas 47 KB

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