systems.pas 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731
  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. system_arm_gba { 42 }
  110. );
  111. tasm = (as_none
  112. ,as_gas { standard gnu assembler }
  113. ,as_i386_as_aout
  114. ,as_i386_nasmcoff
  115. ,as_i386_nasmwin32
  116. ,as_i386_nasmwdosx
  117. ,as_i386_nasmelf
  118. ,as_i386_nasmobj
  119. ,as_i386_nasmbeos
  120. ,as_i386_tasm
  121. ,as_i386_masm
  122. ,as_i386_wasm
  123. ,as_i386_coff
  124. ,as_i386_pecoff
  125. ,as_i386_elf32
  126. ,as_i386_pecoffwdosx
  127. ,as_m68k_mit
  128. ,as_powerpc_mpw
  129. ,as_darwin
  130. ,as_x86_64_masm
  131. ,as_x86_64_pecoff
  132. ,as_i386_pecoffwince
  133. );
  134. tar = (ar_none
  135. ,ar_gnu_ar,ar_mpw_ar
  136. );
  137. tres = (res_none
  138. ,res_gnu_windres,res_emxbind
  139. ,res_m68k_palmos,res_m68k_mpw
  140. ,res_powerpc_mpw
  141. );
  142. tscripttype = (script_none
  143. ,script_dos,script_unix,script_amiga,
  144. script_mpw
  145. );
  146. tabi = (abi_default
  147. ,abi_powerpc_sysv,abi_powerpc_aix
  148. );
  149. {*****************************************************************************
  150. Structures
  151. *****************************************************************************}
  152. type
  153. { Abstract linker class which is implemented in link module }
  154. TAbstractLinker = class
  155. end;
  156. TAbstractLinkerClass = class of TAbstractLinker;
  157. { Abstract assembler class which is implemented in assemble module }
  158. TAbstractAssembler = class
  159. end;
  160. TAbstractAssemblerClass = class of TAbstractAssembler;
  161. palignmentinfo = ^talignmentinfo;
  162. talignmentinfo = record
  163. procalign,
  164. loopalign,
  165. jumpalign,
  166. constalignmin,
  167. constalignmax,
  168. varalignmin,
  169. varalignmax,
  170. localalignmin,
  171. localalignmax,
  172. recordalignmin,
  173. recordalignmax,
  174. maxCrecordalign : longint;
  175. end;
  176. tasmflags = (af_none,
  177. af_outputbinary,af_allowdirect,
  178. af_needar,af_smartlink_sections,
  179. af_labelprefix_only_inside_procedure,
  180. af_supports_dwarf
  181. );
  182. pasminfo = ^tasminfo;
  183. tasminfo = record
  184. id : tasm;
  185. idtxt : string[9];
  186. asmbin : string[8];
  187. asmcmd : string[50];
  188. supported_target : tsystem;
  189. flags : set of tasmflags;
  190. labelprefix : string[3];
  191. comment : string[3];
  192. end;
  193. parinfo = ^tarinfo;
  194. tarinfo = record
  195. id : tar;
  196. arcmd : string[50];
  197. end;
  198. presinfo = ^tresinfo;
  199. tresinfo = record
  200. id : tres;
  201. resbin : string[8];
  202. rescmd : string[50];
  203. end;
  204. tsystemflags = (tf_none,
  205. tf_under_development,
  206. tf_need_export,tf_needs_isconsole,
  207. tf_code_small,tf_static_reg_based,
  208. tf_needs_symbol_size,
  209. tf_smartlink_sections,
  210. tf_needs_dwarf_cfi,
  211. tf_use_8_3,
  212. tf_pic_uses_got,
  213. tf_library_needs_pic
  214. );
  215. psysteminfo = ^tsysteminfo;
  216. { using packed causes bus errors on processors which require alignment }
  217. tsysteminfo = record
  218. system : tsystem;
  219. name : string[34];
  220. shortname : string[9];
  221. flags : set of tsystemflags;
  222. cpu : tsystemcpu;
  223. unit_env : string[16];
  224. extradefines : string[40];
  225. exeext,
  226. defext,
  227. scriptext,
  228. smartext,
  229. unitext,
  230. unitlibext,
  231. asmext,
  232. objext,
  233. resext,
  234. resobjext : string[4];
  235. sharedlibext : string[10];
  236. staticlibext,
  237. staticlibprefix : string[4];
  238. sharedlibprefix : string[4];
  239. sharedClibext : string[10];
  240. staticClibext,
  241. staticClibprefix : string[4];
  242. sharedClibprefix : string[4];
  243. p_ext_support:Boolean; {Whether extension .p is supported by default}
  244. Cprefix : string[2];
  245. newline : string[2];
  246. dirsep : char;
  247. files_case_relevent : boolean;
  248. assem : tasm;
  249. assemextern : tasm; { external assembler, used by -a }
  250. link : tabstractlinkerclass;
  251. linkextern : tabstractlinkerclass; { external linker, used by -s }
  252. ar : tar;
  253. res : tres;
  254. script : tscripttype;
  255. endian : tendian;
  256. alignment : talignmentinfo;
  257. {
  258. Offset from the argument pointer register to the first
  259. argument's address. On some machines it may depend on
  260. the data type of the function.
  261. (see also FIRST_PARM_OFFSET in GCC source)
  262. }
  263. first_parm_offset : longint;
  264. stacksize : longint;
  265. DllScanSupported : boolean;
  266. use_function_relative_addresses : boolean;
  267. abi : tabi;
  268. end;
  269. const
  270. { alias for supported_target field in tasminfo }
  271. system_any = system_none;
  272. system_wince : set of tsystem = [system_arm_wince,system_i386_wince];
  273. system_linux : set of tsystem = [system_i386_linux,system_x86_64_linux,system_powerpc_linux,
  274. system_arm_linux,system_sparc_linux,system_alpha_linux,system_m68k_linux,
  275. system_x86_6432_linux];
  276. cpu2str : array[TSystemCpu] of string =
  277. ('','i386','m68k','alpha','powerpc','sparc','vm','ia64','x86_64',
  278. 'mips','arm');
  279. var
  280. targetinfos : array[tsystem] of psysteminfo;
  281. arinfos : array[tar] of parinfo;
  282. resinfos : array[tres] of presinfo;
  283. asminfos : array[tasm] of pasminfo;
  284. source_info : tsysteminfo;
  285. target_cpu : tsystemcpu;
  286. target_info : tsysteminfo;
  287. target_asm : tasminfo;
  288. target_ar : tarinfo;
  289. target_res : tresinfo;
  290. target_cpu_string,
  291. target_os_string : string[12]; { for rtl/<X>/,fcl/<X>/, etc. }
  292. target_full_string : string[24];
  293. function set_target(t:tsystem):boolean;
  294. function set_target_asm(t:tasm):boolean;
  295. function set_target_ar(t:tar):boolean;
  296. function set_target_res(t:tres):boolean;
  297. function set_target_by_string(const s : string) : boolean;
  298. function set_target_asm_by_string(const s : string) : boolean;
  299. procedure set_source_info(const ti : tsysteminfo);
  300. procedure UpdateAlignment(var d:talignmentinfo;const s:talignmentinfo);
  301. procedure RegisterTarget(const r:tsysteminfo);
  302. procedure RegisterRes(const r:tresinfo);
  303. procedure RegisterAr(const r:tarinfo);
  304. { Register the external linker. This routine is called to setup the
  305. class to use for the linker. It returns the tsysteminfo structure
  306. updated with the correct linker class for external linking.
  307. }
  308. procedure RegisterExternalLinker(var system_info: tsysteminfo; c:TAbstractLinkerClass);
  309. { Register the internal linker. This routine is called to setup the
  310. class to use for the linker. It returns the tsysteminfo structure
  311. updated with the correct linker class for internal linking.
  312. If internal linking is not supported, this class can be set
  313. to nil.
  314. }
  315. procedure RegisterInternalLinker(var system_info : tsysteminfo; c:TAbstractLinkerClass);
  316. procedure InitSystems;
  317. {$ifdef FreeBSD}
  318. function GetOSRelDate:Longint;
  319. {$endif}
  320. implementation
  321. uses
  322. cutils{$ifdef FreeBSD},SysCtl,BaseUnix{$endif};
  323. {****************************************************************************
  324. OS runtime version detection utility routine
  325. ****************************************************************************}
  326. {$ifdef FreeBSD}
  327. function GetOSRelDate:Longint;
  328. var
  329. mib : array[0..1] of cint;
  330. rval : cint;
  331. len : size_t;
  332. i : longint;
  333. v : longint;
  334. oerrno : cint;
  335. S : AnsiString;
  336. Begin
  337. s:='ab';
  338. SetLength(S,50);
  339. mib[0] := CTL_KERN;
  340. mib[1] := KERN_OSRELDATE;
  341. len := 4;
  342. oerrno:= fpgeterrno;
  343. if (FPsysctl(@mib, 2, pchar(@v), @len, NIL, 0) = -1) Then
  344. Begin
  345. if (fpgeterrno = ESysENOMEM) Then
  346. fpseterrno(oerrno);
  347. GetOSRelDate:=0;
  348. End
  349. else
  350. GetOSRelDate:=v;
  351. End;
  352. {$endif}
  353. {****************************************************************************
  354. Target setting
  355. ****************************************************************************}
  356. function set_target(t:tsystem):boolean;
  357. begin
  358. set_target:=false;
  359. if assigned(targetinfos[t]) then
  360. begin
  361. target_info:=targetinfos[t]^;
  362. set_target_asm(target_info.assem);
  363. set_target_ar(target_info.ar);
  364. set_target_res(target_info.res);
  365. target_cpu:=target_info.cpu;
  366. target_os_string:=lower(target_info.shortname);
  367. target_cpu_string:=cpu2str[target_cpu];
  368. target_full_string:=target_cpu_string+'-'+target_os_string;
  369. set_target:=true;
  370. exit;
  371. end;
  372. end;
  373. function set_target_asm(t:tasm):boolean;
  374. begin
  375. set_target_asm:=false;
  376. if assigned(asminfos[t]) and
  377. ((asminfos[t]^.supported_target=target_info.system) or
  378. (asminfos[t]^.supported_target=system_any)) then
  379. begin
  380. target_asm:=asminfos[t]^;
  381. set_target_asm:=true;
  382. exit;
  383. end;
  384. end;
  385. function set_target_ar(t:tar):boolean;
  386. begin
  387. set_target_ar:=false;
  388. if assigned(arinfos[t]) then
  389. begin
  390. target_ar:=arinfos[t]^;
  391. set_target_ar:=true;
  392. exit;
  393. end;
  394. end;
  395. function set_target_res(t:tres):boolean;
  396. begin
  397. set_target_res:=false;
  398. if assigned(resinfos[t]) then
  399. begin
  400. target_res:=resinfos[t]^;
  401. set_target_res:=true;
  402. exit;
  403. end;
  404. end;
  405. function set_target_by_string(const s : string) : boolean;
  406. var
  407. hs : string;
  408. t : tsystem;
  409. begin
  410. set_target_by_string:=false;
  411. { this should be case insensitive !! PM }
  412. hs:=upper(s);
  413. for t:=low(tsystem) to high(tsystem) do
  414. if assigned(targetinfos[t]) and
  415. (upper(targetinfos[t]^.shortname)=hs) then
  416. begin
  417. set_target_by_string:=set_target(t);
  418. exit;
  419. end;
  420. end;
  421. function set_target_asm_by_string(const s : string) : boolean;
  422. var
  423. hs : string;
  424. t : tasm;
  425. begin
  426. set_target_asm_by_string:=false;
  427. { this should be case insensitive !! PM }
  428. hs:=upper(s);
  429. for t:=low(tasm) to high(tasm) do
  430. if assigned(asminfos[t]) and
  431. (asminfos[t]^.idtxt=hs) then
  432. begin
  433. set_target_asm_by_string:=set_target_asm(t);
  434. exit;
  435. end;
  436. end;
  437. procedure UpdateAlignment(var d:talignmentinfo;const s:talignmentinfo);
  438. begin
  439. with d do
  440. begin
  441. { general update rules:
  442. minimum: if higher then update
  443. maximum: if lower then update or if undefined then update }
  444. if s.procalign>procalign then
  445. procalign:=s.procalign;
  446. if s.loopalign>loopalign then
  447. loopalign:=s.loopalign;
  448. if s.jumpalign>jumpalign then
  449. jumpalign:=s.jumpalign;
  450. if s.constalignmin>constalignmin then
  451. constalignmin:=s.constalignmin;
  452. if (constalignmax=0) or
  453. ((s.constalignmax>0) and (s.constalignmax<constalignmax)) then
  454. constalignmax:=s.constalignmax;
  455. if s.varalignmin>varalignmin then
  456. varalignmin:=s.varalignmin;
  457. if (varalignmax=0) or
  458. ((s.varalignmax>0) and (s.varalignmax<varalignmax)) then
  459. varalignmax:=s.varalignmax;
  460. if s.localalignmin>localalignmin then
  461. localalignmin:=s.localalignmin;
  462. if (localalignmax=0) or
  463. ((s.localalignmax>0) and (s.localalignmax<localalignmax)) then
  464. localalignmax:=s.localalignmax;
  465. if s.recordalignmin>recordalignmin then
  466. recordalignmin:=s.recordalignmin;
  467. if (recordalignmax=0) or
  468. ((s.recordalignmax>0) and (s.recordalignmax<recordalignmax)) then
  469. recordalignmax:=s.recordalignmax;
  470. if (maxCrecordalign=0) or
  471. ((s.maxCrecordalign>0) and (s.maxCrecordalign<maxCrecordalign)) then
  472. maxCrecordalign:=s.maxCrecordalign;
  473. end;
  474. end;
  475. {****************************************************************************
  476. Target registration
  477. ****************************************************************************}
  478. procedure RegisterTarget(const r:tsysteminfo);
  479. var
  480. t : tsystem;
  481. begin
  482. t:=r.system;
  483. if assigned(targetinfos[t]) then
  484. writeln('Warning: Target is already registered!')
  485. else
  486. Getmem(targetinfos[t],sizeof(tsysteminfo));
  487. targetinfos[t]^:=r;
  488. end;
  489. procedure RegisterRes(const r:tresinfo);
  490. var
  491. t : tres;
  492. begin
  493. t:=r.id;
  494. if assigned(resinfos[t]) then
  495. writeln('Warning: resourcecompiler is already registered!')
  496. else
  497. Getmem(resinfos[t],sizeof(tresinfo));
  498. resinfos[t]^:=r;
  499. end;
  500. procedure RegisterAr(const r:tarinfo);
  501. var
  502. t : tar;
  503. begin
  504. t:=r.id;
  505. if assigned(arinfos[t]) then
  506. writeln('Warning: ar is already registered!')
  507. else
  508. Getmem(arinfos[t],sizeof(tarinfo));
  509. arinfos[t]^:=r;
  510. end;
  511. procedure RegisterExternalLinker(var system_info: tsysteminfo; c:TAbstractLinkerClass);
  512. begin
  513. system_info.linkextern := c;
  514. end;
  515. procedure RegisterInternalLinker(var system_info : tsysteminfo; c:TAbstractLinkerClass);
  516. begin
  517. system_info.link := c;
  518. end;
  519. procedure DeregisterInfos;
  520. var
  521. assem : tasm;
  522. target : tsystem;
  523. ar : tar;
  524. res : tres;
  525. begin
  526. for target:=low(tsystem) to high(tsystem) do
  527. if assigned(targetinfos[target]) then
  528. begin
  529. freemem(targetinfos[target],sizeof(tsysteminfo));
  530. targetinfos[target]:=nil;
  531. end;
  532. for assem:=low(tasm) to high(tasm) do
  533. if assigned(asminfos[assem]) then
  534. begin
  535. freemem(asminfos[assem],sizeof(tasminfo));
  536. asminfos[assem]:=nil;
  537. end;
  538. for ar:=low(tar) to high(tar) do
  539. if assigned(arinfos[ar]) then
  540. begin
  541. freemem(arinfos[ar],sizeof(tarinfo));
  542. arinfos[ar]:=nil;
  543. end;
  544. for res:=low(tres) to high(tres) do
  545. if assigned(resinfos[res]) then
  546. begin
  547. freemem(resinfos[res],sizeof(tresinfo));
  548. resinfos[res]:=nil;
  549. end;
  550. end;
  551. {****************************************************************************
  552. Initialization of default target
  553. ****************************************************************************}
  554. procedure default_target(t:tsystem);
  555. begin
  556. set_target(t);
  557. if source_info.name='' then
  558. source_info:=target_info;
  559. end;
  560. procedure set_source_info(const ti : tsysteminfo);
  561. begin
  562. { can't use message() here (PFV) }
  563. if source_info.name<>'' then
  564. Writeln('Warning: Source OS Redefined!');
  565. source_info:=ti;
  566. end;
  567. procedure InitSystems;
  568. begin
  569. { Now default target, this is dependent on the target cpu define,
  570. when the define is the same as the source cpu then we use the source
  571. os, else we pick a default }
  572. {$ifdef i386}
  573. {$ifdef cpu86}
  574. default_target(source_info.system);
  575. {$else cpu86}
  576. {$ifdef linux}
  577. default_target(system_i386_linux);
  578. {$endif}
  579. {$ifdef freebsd}
  580. default_target(system_i386_freebsd);
  581. {$endif}
  582. {$endif cpu86}
  583. {$endif i386}
  584. {$ifdef x86_64}
  585. {$ifdef cpux86_64}
  586. default_target(source_info.system);
  587. {$define source_system_set}
  588. {$else cpux86_64}
  589. {$ifdef linux}
  590. default_target(system_x86_64_linux);
  591. {$define source_system_set}
  592. {$endif}
  593. {$ifdef freebsd}
  594. default_target(system_x86_64_freebsd);
  595. {$define source_system_set}
  596. {$endif}
  597. { default is linux }
  598. {$ifndef source_system_set}
  599. default_target(system_x86_64_linux);
  600. {$endif source_system_set}
  601. {$endif cpux86_64}
  602. {$endif x86_64}
  603. {$ifdef m68k}
  604. {$ifdef cpu68}
  605. default_target(source_info.target);
  606. {$else cpu68}
  607. default_target(system_m68k_linux);
  608. {$endif cpu68}
  609. {$endif m68k}
  610. {$ifdef alpha}
  611. {$ifdef cpualpha}
  612. default_target(source_info.system);
  613. {$else cpualpha}
  614. default_target(system_alpha_linux);
  615. {$endif cpualpha}
  616. {$endif alpha}
  617. {$ifdef powerpc}
  618. {$ifdef cpupowerpc}
  619. default_target(source_info.system);
  620. {$else cpupowerpc}
  621. default_target(system_powerpc_linux);
  622. {$endif cpupowerpc}
  623. {$endif powerpc}
  624. {$ifdef sparc}
  625. {$ifdef cpusparc}
  626. default_target(source_info.system);
  627. {$else cpusparc}
  628. default_target(system_sparc_linux);
  629. {$endif cpusparc}
  630. {$endif sparc}
  631. {$ifdef arm}
  632. {$ifdef cpuarm}
  633. default_target(source_info.system);
  634. {$else cpuarm}
  635. default_target(system_arm_linux);
  636. {$endif cpuarm}
  637. {$endif arm}
  638. end;
  639. initialization
  640. source_info.name:='';
  641. finalization
  642. DeregisterInfos;
  643. end.