systems.pas 21 KB

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