systems.pas 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730
  1. {
  2. Copyright (c) 1998-2002 by Florian Klaempfl
  3. This unit contains information about the target systems supported
  4. (these are not processor specific)
  5. This program is free software; you can redistribute it and/or modify
  6. iu under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge- MA 02139, USA.
  16. ****************************************************************************
  17. }
  18. unit systems;
  19. {$i fpcdefs.inc}
  20. interface
  21. type
  22. tendian = (endian_little,endian_big);
  23. (*
  24. IMPORTANT NOTE:
  25. The value of this enumeration is stored in PPU files.
  26. Therefore adding new CPU targets should not change the
  27. values of the pre-existing targets. (CEC)
  28. FURTHERMORE : Make sure that this branch values, are
  29. consistant with the main branch version always.
  30. *)
  31. tsystemcpu=
  32. (
  33. cpu_no, { 0 }
  34. cpu_i386, { 1 }
  35. cpu_m68k, { 2 }
  36. cpu_alpha, { 3 }
  37. cpu_powerpc, { 4 }
  38. cpu_sparc, { 5 }
  39. cpu_vm, { 6 }
  40. cpu_iA64, { 7 }
  41. cpu_x86_64, { 8 }
  42. cpu_mips, { 9 }
  43. cpu_arm { 10 }
  44. );
  45. tasmmode= (asmmode_none
  46. { standard assembler (cpu dependant) with full parsing }
  47. ,asmmode_standard
  48. ,asmmode_i386_att
  49. ,asmmode_i386_intel
  50. ,asmmode_ppc_gas
  51. ,asmmode_ppc_motorola
  52. ,asmmode_arm_gas
  53. ,asmmode_sparc_gas
  54. ,asmmode_x86_64_gas
  55. ,asmmode_m68k_mot
  56. );
  57. (* IMPORTANT NOTE:
  58. the integer value of this enum is stored in PPU
  59. files to recognize the target, so if you add new targets
  60. allways add them at end PM
  61. FURTHERMORE : Make sure that this branch values are
  62. consistant with the main branch version always. (CEC)
  63. *)
  64. type
  65. tsystem =
  66. (
  67. system_none, { 0 }
  68. obsolete_system_i386_GO32V1,{ 1 }
  69. system_i386_GO32V2, { 2 }
  70. system_i386_linux, { 3 }
  71. system_i386_OS2, { 4 }
  72. system_i386_Win32, { 5 }
  73. system_i386_freebsd, { 6 }
  74. system_m68k_Amiga, { 7 }
  75. system_m68k_Atari, { 8 }
  76. system_m68k_Mac, { 9 }
  77. system_m68k_linux, { 10 }
  78. system_m68k_PalmOS, { 11 }
  79. system_alpha_linux, { 12 }
  80. system_powerpc_linux, { 13 }
  81. system_powerpc_macos, { 14 }
  82. system_i386_solaris, { 15 }
  83. system_i386_beos, { 16 }
  84. system_i386_netbsd, { 17 }
  85. system_m68k_netbsd, { 18 }
  86. system_i386_Netware, { 19 }
  87. system_i386_qnx, { 20 }
  88. system_i386_wdosx, { 21 }
  89. system_sparc_solaris, { 22 }
  90. system_sparc_linux, { 23 }
  91. system_i386_openbsd, { 24 }
  92. system_m68k_openbsd, { 25 }
  93. system_x86_64_linux, { 26 }
  94. system_powerpc_darwin, { 27 }
  95. system_i386_EMX, { 28 }
  96. system_powerpc_netbsd, { 29 }
  97. system_powerpc_openbsd, { 30 }
  98. system_arm_linux, { 31 }
  99. system_i386_watcom, { 32 }
  100. system_powerpc_MorphOS, { 33 }
  101. system_x86_64_freebsd, { 34 }
  102. system_i386_netwlibc, { 35 }
  103. system_powerpc_Amiga, { 36 }
  104. system_x86_64_win64, { 37 }
  105. system_arm_wince, { 38 }
  106. system_ia64_win64, { 39 }
  107. system_i386_wince, { 40 }
  108. system_x86_6432_linux { 41 }
  109. );
  110. tasm = (as_none
  111. ,as_gas { standard gnu assembler }
  112. ,as_i386_as_aout
  113. ,as_i386_nasmcoff
  114. ,as_i386_nasmwin32
  115. ,as_i386_nasmwdosx
  116. ,as_i386_nasmelf
  117. ,as_i386_nasmobj
  118. ,as_i386_nasmbeos
  119. ,as_i386_tasm
  120. ,as_i386_masm
  121. ,as_i386_wasm
  122. ,as_i386_coff
  123. ,as_i386_pecoff
  124. ,as_i386_elf32
  125. ,as_i386_pecoffwdosx
  126. ,as_m68k_mit
  127. ,as_powerpc_mpw
  128. ,as_darwin
  129. ,as_x86_64_masm
  130. ,as_x86_64_pecoff
  131. ,as_i386_pecoffwince
  132. );
  133. tar = (ar_none
  134. ,ar_gnu_ar,ar_mpw_ar
  135. );
  136. tres = (res_none
  137. ,res_gnu_windres,res_emxbind
  138. ,res_m68k_palmos,res_m68k_mpw
  139. ,res_powerpc_mpw
  140. );
  141. tscripttype = (script_none
  142. ,script_dos,script_unix,script_amiga,
  143. script_mpw
  144. );
  145. tabi = (abi_default
  146. ,abi_powerpc_sysv,abi_powerpc_aix
  147. );
  148. {*****************************************************************************
  149. Structures
  150. *****************************************************************************}
  151. type
  152. { Abstract linker class which is implemented in link module }
  153. TAbstractLinker = class
  154. end;
  155. TAbstractLinkerClass = class of TAbstractLinker;
  156. { Abstract assembler class which is implemented in assemble module }
  157. TAbstractAssembler = class
  158. end;
  159. TAbstractAssemblerClass = class of TAbstractAssembler;
  160. palignmentinfo = ^talignmentinfo;
  161. talignmentinfo = record
  162. procalign,
  163. loopalign,
  164. jumpalign,
  165. constalignmin,
  166. constalignmax,
  167. varalignmin,
  168. varalignmax,
  169. localalignmin,
  170. localalignmax,
  171. recordalignmin,
  172. recordalignmax,
  173. maxCrecordalign : longint;
  174. end;
  175. tasmflags = (af_none,
  176. af_outputbinary,af_allowdirect,
  177. af_needar,af_smartlink_sections,
  178. af_labelprefix_only_inside_procedure,
  179. af_supports_dwarf
  180. );
  181. pasminfo = ^tasminfo;
  182. tasminfo = record
  183. id : tasm;
  184. idtxt : string[9];
  185. asmbin : string[8];
  186. asmcmd : string[50];
  187. supported_target : tsystem;
  188. flags : set of tasmflags;
  189. labelprefix : string[3];
  190. comment : string[3];
  191. end;
  192. parinfo = ^tarinfo;
  193. tarinfo = record
  194. id : tar;
  195. arcmd : string[50];
  196. end;
  197. presinfo = ^tresinfo;
  198. tresinfo = record
  199. id : tres;
  200. resbin : string[8];
  201. rescmd : string[50];
  202. end;
  203. tsystemflags = (tf_none,
  204. tf_under_development,
  205. tf_need_export,tf_needs_isconsole,
  206. tf_code_small,tf_static_reg_based,
  207. tf_needs_symbol_size,
  208. tf_smartlink_sections,
  209. tf_needs_dwarf_cfi,
  210. tf_use_8_3,
  211. tf_pic_uses_got,
  212. tf_library_needs_pic
  213. );
  214. psysteminfo = ^tsysteminfo;
  215. { using packed causes bus errors on processors which require alignment }
  216. tsysteminfo = record
  217. system : tsystem;
  218. name : string[34];
  219. shortname : string[9];
  220. flags : set of tsystemflags;
  221. cpu : tsystemcpu;
  222. unit_env : string[16];
  223. extradefines : string[40];
  224. exeext,
  225. defext,
  226. scriptext,
  227. smartext,
  228. unitext,
  229. unitlibext,
  230. asmext,
  231. objext,
  232. resext,
  233. resobjext : string[4];
  234. sharedlibext : string[10];
  235. staticlibext,
  236. staticlibprefix : string[4];
  237. sharedlibprefix : string[4];
  238. sharedClibext : string[10];
  239. staticClibext,
  240. staticClibprefix : string[4];
  241. sharedClibprefix : string[4];
  242. p_ext_support:Boolean; {Whether extension .p is supported by default}
  243. Cprefix : string[2];
  244. newline : string[2];
  245. dirsep : char;
  246. files_case_relevent : boolean;
  247. assem : tasm;
  248. assemextern : tasm; { external assembler, used by -a }
  249. link : tabstractlinkerclass;
  250. linkextern : tabstractlinkerclass; { external linker, used by -s }
  251. ar : tar;
  252. res : tres;
  253. script : tscripttype;
  254. endian : tendian;
  255. alignment : talignmentinfo;
  256. {
  257. Offset from the argument pointer register to the first
  258. argument's address. On some machines it may depend on
  259. the data type of the function.
  260. (see also FIRST_PARM_OFFSET in GCC source)
  261. }
  262. first_parm_offset : longint;
  263. stacksize : longint;
  264. DllScanSupported : boolean;
  265. use_function_relative_addresses : boolean;
  266. abi : tabi;
  267. end;
  268. const
  269. { alias for supported_target field in tasminfo }
  270. system_any = system_none;
  271. system_wince : set of tsystem = [system_arm_wince,system_i386_wince];
  272. system_linux : set of tsystem = [system_i386_linux,system_x86_64_linux,system_powerpc_linux,
  273. system_arm_linux,system_sparc_linux,system_alpha_linux,system_m68k_linux,
  274. system_x86_6432_linux];
  275. cpu2str : array[TSystemCpu] of string =
  276. ('','i386','m68k','alpha','powerpc','sparc','vm','ia64','x86_64',
  277. 'mips','arm');
  278. var
  279. targetinfos : array[tsystem] of psysteminfo;
  280. arinfos : array[tar] of parinfo;
  281. resinfos : array[tres] of presinfo;
  282. asminfos : array[tasm] of pasminfo;
  283. source_info : tsysteminfo;
  284. target_cpu : tsystemcpu;
  285. target_info : tsysteminfo;
  286. target_asm : tasminfo;
  287. target_ar : tarinfo;
  288. target_res : tresinfo;
  289. target_cpu_string,
  290. target_os_string : string[12]; { for rtl/<X>/,fcl/<X>/, etc. }
  291. target_full_string : string[24];
  292. function set_target(t:tsystem):boolean;
  293. function set_target_asm(t:tasm):boolean;
  294. function set_target_ar(t:tar):boolean;
  295. function set_target_res(t:tres):boolean;
  296. function set_target_by_string(const s : string) : boolean;
  297. function set_target_asm_by_string(const s : string) : boolean;
  298. procedure set_source_info(const ti : tsysteminfo);
  299. procedure UpdateAlignment(var d:talignmentinfo;const s:talignmentinfo);
  300. procedure RegisterTarget(const r:tsysteminfo);
  301. procedure RegisterRes(const r:tresinfo);
  302. procedure RegisterAr(const r:tarinfo);
  303. { Register the external linker. This routine is called to setup the
  304. class to use for the linker. It returns the tsysteminfo structure
  305. updated with the correct linker class for external linking.
  306. }
  307. procedure RegisterExternalLinker(var system_info: tsysteminfo; c:TAbstractLinkerClass);
  308. { Register the internal linker. This routine is called to setup the
  309. class to use for the linker. It returns the tsysteminfo structure
  310. updated with the correct linker class for internal linking.
  311. If internal linking is not supported, this class can be set
  312. to nil.
  313. }
  314. procedure RegisterInternalLinker(var system_info : tsysteminfo; c:TAbstractLinkerClass);
  315. procedure InitSystems;
  316. {$ifdef FreeBSD}
  317. function GetOSRelDate:Longint;
  318. {$endif}
  319. implementation
  320. uses
  321. cutils{$ifdef FreeBSD},SysCtl,BaseUnix{$endif};
  322. {****************************************************************************
  323. OS runtime version detection utility routine
  324. ****************************************************************************}
  325. {$ifdef FreeBSD}
  326. function GetOSRelDate:Longint;
  327. var
  328. mib : array[0..1] of cint;
  329. rval : cint;
  330. len : size_t;
  331. i : longint;
  332. v : longint;
  333. oerrno : cint;
  334. S : AnsiString;
  335. Begin
  336. s:='ab';
  337. SetLength(S,50);
  338. mib[0] := CTL_KERN;
  339. mib[1] := KERN_OSRELDATE;
  340. len := 4;
  341. oerrno:= fpgeterrno;
  342. if (FPsysctl(@mib, 2, pchar(@v), @len, NIL, 0) = -1) Then
  343. Begin
  344. if (fpgeterrno = ESysENOMEM) Then
  345. fpseterrno(oerrno);
  346. GetOSRelDate:=0;
  347. End
  348. else
  349. GetOSRelDate:=v;
  350. End;
  351. {$endif}
  352. {****************************************************************************
  353. Target setting
  354. ****************************************************************************}
  355. function set_target(t:tsystem):boolean;
  356. begin
  357. set_target:=false;
  358. if assigned(targetinfos[t]) then
  359. begin
  360. target_info:=targetinfos[t]^;
  361. set_target_asm(target_info.assem);
  362. set_target_ar(target_info.ar);
  363. set_target_res(target_info.res);
  364. target_cpu:=target_info.cpu;
  365. target_os_string:=lower(target_info.shortname);
  366. target_cpu_string:=cpu2str[target_cpu];
  367. target_full_string:=target_cpu_string+'-'+target_os_string;
  368. set_target:=true;
  369. exit;
  370. end;
  371. end;
  372. function set_target_asm(t:tasm):boolean;
  373. begin
  374. set_target_asm:=false;
  375. if assigned(asminfos[t]) and
  376. ((asminfos[t]^.supported_target=target_info.system) or
  377. (asminfos[t]^.supported_target=system_any)) then
  378. begin
  379. target_asm:=asminfos[t]^;
  380. set_target_asm:=true;
  381. exit;
  382. end;
  383. end;
  384. function set_target_ar(t:tar):boolean;
  385. begin
  386. set_target_ar:=false;
  387. if assigned(arinfos[t]) then
  388. begin
  389. target_ar:=arinfos[t]^;
  390. set_target_ar:=true;
  391. exit;
  392. end;
  393. end;
  394. function set_target_res(t:tres):boolean;
  395. begin
  396. set_target_res:=false;
  397. if assigned(resinfos[t]) then
  398. begin
  399. target_res:=resinfos[t]^;
  400. set_target_res:=true;
  401. exit;
  402. end;
  403. end;
  404. function set_target_by_string(const s : string) : boolean;
  405. var
  406. hs : string;
  407. t : tsystem;
  408. begin
  409. set_target_by_string:=false;
  410. { this should be case insensitive !! PM }
  411. hs:=upper(s);
  412. for t:=low(tsystem) to high(tsystem) do
  413. if assigned(targetinfos[t]) and
  414. (upper(targetinfos[t]^.shortname)=hs) then
  415. begin
  416. set_target_by_string:=set_target(t);
  417. exit;
  418. end;
  419. end;
  420. function set_target_asm_by_string(const s : string) : boolean;
  421. var
  422. hs : string;
  423. t : tasm;
  424. begin
  425. set_target_asm_by_string:=false;
  426. { this should be case insensitive !! PM }
  427. hs:=upper(s);
  428. for t:=low(tasm) to high(tasm) do
  429. if assigned(asminfos[t]) and
  430. (asminfos[t]^.idtxt=hs) then
  431. begin
  432. set_target_asm_by_string:=set_target_asm(t);
  433. exit;
  434. end;
  435. end;
  436. procedure UpdateAlignment(var d:talignmentinfo;const s:talignmentinfo);
  437. begin
  438. with d do
  439. begin
  440. { general update rules:
  441. minimum: if higher then update
  442. maximum: if lower then update or if undefined then update }
  443. if s.procalign>procalign then
  444. procalign:=s.procalign;
  445. if s.loopalign>loopalign then
  446. loopalign:=s.loopalign;
  447. if s.jumpalign>jumpalign then
  448. jumpalign:=s.jumpalign;
  449. if s.constalignmin>constalignmin then
  450. constalignmin:=s.constalignmin;
  451. if (constalignmax=0) or
  452. ((s.constalignmax>0) and (s.constalignmax<constalignmax)) then
  453. constalignmax:=s.constalignmax;
  454. if s.varalignmin>varalignmin then
  455. varalignmin:=s.varalignmin;
  456. if (varalignmax=0) or
  457. ((s.varalignmax>0) and (s.varalignmax<varalignmax)) then
  458. varalignmax:=s.varalignmax;
  459. if s.localalignmin>localalignmin then
  460. localalignmin:=s.localalignmin;
  461. if (localalignmax=0) or
  462. ((s.localalignmax>0) and (s.localalignmax<localalignmax)) then
  463. localalignmax:=s.localalignmax;
  464. if s.recordalignmin>recordalignmin then
  465. recordalignmin:=s.recordalignmin;
  466. if (recordalignmax=0) or
  467. ((s.recordalignmax>0) and (s.recordalignmax<recordalignmax)) then
  468. recordalignmax:=s.recordalignmax;
  469. if (maxCrecordalign=0) or
  470. ((s.maxCrecordalign>0) and (s.maxCrecordalign<maxCrecordalign)) then
  471. maxCrecordalign:=s.maxCrecordalign;
  472. end;
  473. end;
  474. {****************************************************************************
  475. Target registration
  476. ****************************************************************************}
  477. procedure RegisterTarget(const r:tsysteminfo);
  478. var
  479. t : tsystem;
  480. begin
  481. t:=r.system;
  482. if assigned(targetinfos[t]) then
  483. writeln('Warning: Target is already registered!')
  484. else
  485. Getmem(targetinfos[t],sizeof(tsysteminfo));
  486. targetinfos[t]^:=r;
  487. end;
  488. procedure RegisterRes(const r:tresinfo);
  489. var
  490. t : tres;
  491. begin
  492. t:=r.id;
  493. if assigned(resinfos[t]) then
  494. writeln('Warning: resourcecompiler is already registered!')
  495. else
  496. Getmem(resinfos[t],sizeof(tresinfo));
  497. resinfos[t]^:=r;
  498. end;
  499. procedure RegisterAr(const r:tarinfo);
  500. var
  501. t : tar;
  502. begin
  503. t:=r.id;
  504. if assigned(arinfos[t]) then
  505. writeln('Warning: ar is already registered!')
  506. else
  507. Getmem(arinfos[t],sizeof(tarinfo));
  508. arinfos[t]^:=r;
  509. end;
  510. procedure RegisterExternalLinker(var system_info: tsysteminfo; c:TAbstractLinkerClass);
  511. begin
  512. system_info.linkextern := c;
  513. end;
  514. procedure RegisterInternalLinker(var system_info : tsysteminfo; c:TAbstractLinkerClass);
  515. begin
  516. system_info.link := c;
  517. end;
  518. procedure DeregisterInfos;
  519. var
  520. assem : tasm;
  521. target : tsystem;
  522. ar : tar;
  523. res : tres;
  524. begin
  525. for target:=low(tsystem) to high(tsystem) do
  526. if assigned(targetinfos[target]) then
  527. begin
  528. freemem(targetinfos[target],sizeof(tsysteminfo));
  529. targetinfos[target]:=nil;
  530. end;
  531. for assem:=low(tasm) to high(tasm) do
  532. if assigned(asminfos[assem]) then
  533. begin
  534. freemem(asminfos[assem],sizeof(tasminfo));
  535. asminfos[assem]:=nil;
  536. end;
  537. for ar:=low(tar) to high(tar) do
  538. if assigned(arinfos[ar]) then
  539. begin
  540. freemem(arinfos[ar],sizeof(tarinfo));
  541. arinfos[ar]:=nil;
  542. end;
  543. for res:=low(tres) to high(tres) do
  544. if assigned(resinfos[res]) then
  545. begin
  546. freemem(resinfos[res],sizeof(tresinfo));
  547. resinfos[res]:=nil;
  548. end;
  549. end;
  550. {****************************************************************************
  551. Initialization of default target
  552. ****************************************************************************}
  553. procedure default_target(t:tsystem);
  554. begin
  555. set_target(t);
  556. if source_info.name='' then
  557. source_info:=target_info;
  558. end;
  559. procedure set_source_info(const ti : tsysteminfo);
  560. begin
  561. { can't use message() here (PFV) }
  562. if source_info.name<>'' then
  563. Writeln('Warning: Source OS Redefined!');
  564. source_info:=ti;
  565. end;
  566. procedure InitSystems;
  567. begin
  568. { Now default target, this is dependent on the target cpu define,
  569. when the define is the same as the source cpu then we use the source
  570. os, else we pick a default }
  571. {$ifdef i386}
  572. {$ifdef cpu86}
  573. default_target(source_info.system);
  574. {$else cpu86}
  575. {$ifdef linux}
  576. default_target(system_i386_linux);
  577. {$endif}
  578. {$ifdef freebsd}
  579. default_target(system_i386_freebsd);
  580. {$endif}
  581. {$endif cpu86}
  582. {$endif i386}
  583. {$ifdef x86_64}
  584. {$ifdef cpux86_64}
  585. default_target(source_info.system);
  586. {$define source_system_set}
  587. {$else cpux86_64}
  588. {$ifdef linux}
  589. default_target(system_x86_64_linux);
  590. {$define source_system_set}
  591. {$endif}
  592. {$ifdef freebsd}
  593. default_target(system_x86_64_freebsd);
  594. {$define source_system_set}
  595. {$endif}
  596. { default is linux }
  597. {$ifndef source_system_set}
  598. default_target(system_x86_64_linux);
  599. {$endif source_system_set}
  600. {$endif cpux86_64}
  601. {$endif x86_64}
  602. {$ifdef m68k}
  603. {$ifdef cpu68}
  604. default_target(source_info.target);
  605. {$else cpu68}
  606. default_target(system_m68k_linux);
  607. {$endif cpu68}
  608. {$endif m68k}
  609. {$ifdef alpha}
  610. {$ifdef cpualpha}
  611. default_target(source_info.system);
  612. {$else cpualpha}
  613. default_target(system_alpha_linux);
  614. {$endif cpualpha}
  615. {$endif alpha}
  616. {$ifdef powerpc}
  617. {$ifdef cpupowerpc}
  618. default_target(source_info.system);
  619. {$else cpupowerpc}
  620. default_target(system_powerpc_linux);
  621. {$endif cpupowerpc}
  622. {$endif powerpc}
  623. {$ifdef sparc}
  624. {$ifdef cpusparc}
  625. default_target(source_info.system);
  626. {$else cpusparc}
  627. default_target(system_sparc_linux);
  628. {$endif cpusparc}
  629. {$endif sparc}
  630. {$ifdef arm}
  631. {$ifdef cpuarm}
  632. default_target(source_info.system);
  633. {$else cpuarm}
  634. default_target(system_arm_linux);
  635. {$endif cpuarm}
  636. {$endif arm}
  637. end;
  638. initialization
  639. source_info.name:='';
  640. finalization
  641. DeregisterInfos;
  642. end.