systems.pas 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733
  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,res_elf
  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. { all real windows systems, no cripple ones like wince, wdosx et. al. }
  277. system_windows : set of tsystem = [system_i386_win32,system_x86_64_win64,system_ia64_win64];
  278. cpu2str : array[TSystemCpu] of string =
  279. ('','i386','m68k','alpha','powerpc','sparc','vm','ia64','x86_64',
  280. 'mips','arm');
  281. var
  282. targetinfos : array[tsystem] of psysteminfo;
  283. arinfos : array[tar] of parinfo;
  284. resinfos : array[tres] of presinfo;
  285. asminfos : array[tasm] of pasminfo;
  286. source_info : tsysteminfo;
  287. target_cpu : tsystemcpu;
  288. target_info : tsysteminfo;
  289. target_asm : tasminfo;
  290. target_ar : tarinfo;
  291. target_res : tresinfo;
  292. target_cpu_string,
  293. target_os_string : string[12]; { for rtl/<X>/,fcl/<X>/, etc. }
  294. target_full_string : string[24];
  295. function set_target(t:tsystem):boolean;
  296. function set_target_asm(t:tasm):boolean;
  297. function set_target_ar(t:tar):boolean;
  298. function set_target_res(t:tres):boolean;
  299. function set_target_by_string(const s : string) : boolean;
  300. function set_target_asm_by_string(const s : string) : boolean;
  301. procedure set_source_info(const ti : tsysteminfo);
  302. procedure UpdateAlignment(var d:talignmentinfo;const s:talignmentinfo);
  303. procedure RegisterTarget(const r:tsysteminfo);
  304. procedure RegisterRes(const r:tresinfo);
  305. procedure RegisterAr(const r:tarinfo);
  306. { Register the external linker. This routine is called to setup the
  307. class to use for the linker. It returns the tsysteminfo structure
  308. updated with the correct linker class for external linking.
  309. }
  310. procedure RegisterExternalLinker(var system_info: tsysteminfo; c:TAbstractLinkerClass);
  311. { Register the internal linker. This routine is called to setup the
  312. class to use for the linker. It returns the tsysteminfo structure
  313. updated with the correct linker class for internal linking.
  314. If internal linking is not supported, this class can be set
  315. to nil.
  316. }
  317. procedure RegisterInternalLinker(var system_info : tsysteminfo; c:TAbstractLinkerClass);
  318. procedure InitSystems;
  319. {$ifdef FreeBSD}
  320. function GetOSRelDate:Longint;
  321. {$endif}
  322. implementation
  323. uses
  324. cutils{$ifdef FreeBSD},SysCtl,BaseUnix{$endif};
  325. {****************************************************************************
  326. OS runtime version detection utility routine
  327. ****************************************************************************}
  328. {$ifdef FreeBSD}
  329. function GetOSRelDate:Longint;
  330. var
  331. mib : array[0..1] of cint;
  332. rval : cint;
  333. len : size_t;
  334. i : longint;
  335. v : longint;
  336. oerrno : cint;
  337. S : AnsiString;
  338. Begin
  339. s:='ab';
  340. SetLength(S,50);
  341. mib[0] := CTL_KERN;
  342. mib[1] := KERN_OSRELDATE;
  343. len := 4;
  344. oerrno:= fpgeterrno;
  345. if (FPsysctl(@mib, 2, pchar(@v), @len, NIL, 0) = -1) Then
  346. Begin
  347. if (fpgeterrno = ESysENOMEM) Then
  348. fpseterrno(oerrno);
  349. GetOSRelDate:=0;
  350. End
  351. else
  352. GetOSRelDate:=v;
  353. End;
  354. {$endif}
  355. {****************************************************************************
  356. Target setting
  357. ****************************************************************************}
  358. function set_target(t:tsystem):boolean;
  359. begin
  360. set_target:=false;
  361. if assigned(targetinfos[t]) then
  362. begin
  363. target_info:=targetinfos[t]^;
  364. set_target_asm(target_info.assem);
  365. set_target_ar(target_info.ar);
  366. set_target_res(target_info.res);
  367. target_cpu:=target_info.cpu;
  368. target_os_string:=lower(target_info.shortname);
  369. target_cpu_string:=cpu2str[target_cpu];
  370. target_full_string:=target_cpu_string+'-'+target_os_string;
  371. set_target:=true;
  372. exit;
  373. end;
  374. end;
  375. function set_target_asm(t:tasm):boolean;
  376. begin
  377. set_target_asm:=false;
  378. if assigned(asminfos[t]) and
  379. ((asminfos[t]^.supported_target=target_info.system) or
  380. (asminfos[t]^.supported_target=system_any)) then
  381. begin
  382. target_asm:=asminfos[t]^;
  383. set_target_asm:=true;
  384. exit;
  385. end;
  386. end;
  387. function set_target_ar(t:tar):boolean;
  388. begin
  389. set_target_ar:=false;
  390. if assigned(arinfos[t]) then
  391. begin
  392. target_ar:=arinfos[t]^;
  393. set_target_ar:=true;
  394. exit;
  395. end;
  396. end;
  397. function set_target_res(t:tres):boolean;
  398. begin
  399. set_target_res:=false;
  400. if assigned(resinfos[t]) then
  401. begin
  402. target_res:=resinfos[t]^;
  403. set_target_res:=true;
  404. exit;
  405. end;
  406. end;
  407. function set_target_by_string(const s : string) : boolean;
  408. var
  409. hs : string;
  410. t : tsystem;
  411. begin
  412. set_target_by_string:=false;
  413. { this should be case insensitive !! PM }
  414. hs:=upper(s);
  415. for t:=low(tsystem) to high(tsystem) do
  416. if assigned(targetinfos[t]) and
  417. (upper(targetinfos[t]^.shortname)=hs) then
  418. begin
  419. set_target_by_string:=set_target(t);
  420. exit;
  421. end;
  422. end;
  423. function set_target_asm_by_string(const s : string) : boolean;
  424. var
  425. hs : string;
  426. t : tasm;
  427. begin
  428. set_target_asm_by_string:=false;
  429. { this should be case insensitive !! PM }
  430. hs:=upper(s);
  431. for t:=low(tasm) to high(tasm) do
  432. if assigned(asminfos[t]) and
  433. (asminfos[t]^.idtxt=hs) then
  434. begin
  435. set_target_asm_by_string:=set_target_asm(t);
  436. exit;
  437. end;
  438. end;
  439. procedure UpdateAlignment(var d:talignmentinfo;const s:talignmentinfo);
  440. begin
  441. with d do
  442. begin
  443. { general update rules:
  444. minimum: if higher then update
  445. maximum: if lower then update or if undefined then update }
  446. if s.procalign>procalign then
  447. procalign:=s.procalign;
  448. if s.loopalign>loopalign then
  449. loopalign:=s.loopalign;
  450. if s.jumpalign>jumpalign then
  451. jumpalign:=s.jumpalign;
  452. if s.constalignmin>constalignmin then
  453. constalignmin:=s.constalignmin;
  454. if (constalignmax=0) or
  455. ((s.constalignmax>0) and (s.constalignmax<constalignmax)) then
  456. constalignmax:=s.constalignmax;
  457. if s.varalignmin>varalignmin then
  458. varalignmin:=s.varalignmin;
  459. if (varalignmax=0) or
  460. ((s.varalignmax>0) and (s.varalignmax<varalignmax)) then
  461. varalignmax:=s.varalignmax;
  462. if s.localalignmin>localalignmin then
  463. localalignmin:=s.localalignmin;
  464. if (localalignmax=0) or
  465. ((s.localalignmax>0) and (s.localalignmax<localalignmax)) then
  466. localalignmax:=s.localalignmax;
  467. if s.recordalignmin>recordalignmin then
  468. recordalignmin:=s.recordalignmin;
  469. if (recordalignmax=0) or
  470. ((s.recordalignmax>0) and (s.recordalignmax<recordalignmax)) then
  471. recordalignmax:=s.recordalignmax;
  472. if (maxCrecordalign=0) or
  473. ((s.maxCrecordalign>0) and (s.maxCrecordalign<maxCrecordalign)) then
  474. maxCrecordalign:=s.maxCrecordalign;
  475. end;
  476. end;
  477. {****************************************************************************
  478. Target registration
  479. ****************************************************************************}
  480. procedure RegisterTarget(const r:tsysteminfo);
  481. var
  482. t : tsystem;
  483. begin
  484. t:=r.system;
  485. if assigned(targetinfos[t]) then
  486. writeln('Warning: Target is already registered!')
  487. else
  488. Getmem(targetinfos[t],sizeof(tsysteminfo));
  489. targetinfos[t]^:=r;
  490. end;
  491. procedure RegisterRes(const r:tresinfo);
  492. var
  493. t : tres;
  494. begin
  495. t:=r.id;
  496. if assigned(resinfos[t]) then
  497. writeln('Warning: resourcecompiler is already registered!')
  498. else
  499. Getmem(resinfos[t],sizeof(tresinfo));
  500. resinfos[t]^:=r;
  501. end;
  502. procedure RegisterAr(const r:tarinfo);
  503. var
  504. t : tar;
  505. begin
  506. t:=r.id;
  507. if assigned(arinfos[t]) then
  508. writeln('Warning: ar is already registered!')
  509. else
  510. Getmem(arinfos[t],sizeof(tarinfo));
  511. arinfos[t]^:=r;
  512. end;
  513. procedure RegisterExternalLinker(var system_info: tsysteminfo; c:TAbstractLinkerClass);
  514. begin
  515. system_info.linkextern := c;
  516. end;
  517. procedure RegisterInternalLinker(var system_info : tsysteminfo; c:TAbstractLinkerClass);
  518. begin
  519. system_info.link := c;
  520. end;
  521. procedure DeregisterInfos;
  522. var
  523. assem : tasm;
  524. target : tsystem;
  525. ar : tar;
  526. res : tres;
  527. begin
  528. for target:=low(tsystem) to high(tsystem) do
  529. if assigned(targetinfos[target]) then
  530. begin
  531. freemem(targetinfos[target],sizeof(tsysteminfo));
  532. targetinfos[target]:=nil;
  533. end;
  534. for assem:=low(tasm) to high(tasm) do
  535. if assigned(asminfos[assem]) then
  536. begin
  537. freemem(asminfos[assem],sizeof(tasminfo));
  538. asminfos[assem]:=nil;
  539. end;
  540. for ar:=low(tar) to high(tar) do
  541. if assigned(arinfos[ar]) then
  542. begin
  543. freemem(arinfos[ar],sizeof(tarinfo));
  544. arinfos[ar]:=nil;
  545. end;
  546. for res:=low(tres) to high(tres) do
  547. if assigned(resinfos[res]) then
  548. begin
  549. freemem(resinfos[res],sizeof(tresinfo));
  550. resinfos[res]:=nil;
  551. end;
  552. end;
  553. {****************************************************************************
  554. Initialization of default target
  555. ****************************************************************************}
  556. procedure default_target(t:tsystem);
  557. begin
  558. set_target(t);
  559. if source_info.name='' then
  560. source_info:=target_info;
  561. end;
  562. procedure set_source_info(const ti : tsysteminfo);
  563. begin
  564. { can't use message() here (PFV) }
  565. if source_info.name<>'' then
  566. Writeln('Warning: Source OS Redefined!');
  567. source_info:=ti;
  568. end;
  569. procedure InitSystems;
  570. begin
  571. { Now default target, this is dependent on the target cpu define,
  572. when the define is the same as the source cpu then we use the source
  573. os, else we pick a default }
  574. {$ifdef i386}
  575. {$ifdef cpu86}
  576. default_target(source_info.system);
  577. {$else cpu86}
  578. {$ifdef linux}
  579. default_target(system_i386_linux);
  580. {$endif}
  581. {$ifdef freebsd}
  582. default_target(system_i386_freebsd);
  583. {$endif}
  584. {$endif cpu86}
  585. {$endif i386}
  586. {$ifdef x86_64}
  587. {$ifdef cpux86_64}
  588. default_target(source_info.system);
  589. {$define source_system_set}
  590. {$else cpux86_64}
  591. {$ifdef linux}
  592. default_target(system_x86_64_linux);
  593. {$define source_system_set}
  594. {$endif}
  595. {$ifdef freebsd}
  596. default_target(system_x86_64_freebsd);
  597. {$define source_system_set}
  598. {$endif}
  599. { default is linux }
  600. {$ifndef source_system_set}
  601. default_target(system_x86_64_linux);
  602. {$endif source_system_set}
  603. {$endif cpux86_64}
  604. {$endif x86_64}
  605. {$ifdef m68k}
  606. {$ifdef cpu68}
  607. default_target(source_info.target);
  608. {$else cpu68}
  609. default_target(system_m68k_linux);
  610. {$endif cpu68}
  611. {$endif m68k}
  612. {$ifdef alpha}
  613. {$ifdef cpualpha}
  614. default_target(source_info.system);
  615. {$else cpualpha}
  616. default_target(system_alpha_linux);
  617. {$endif cpualpha}
  618. {$endif alpha}
  619. {$ifdef powerpc}
  620. {$ifdef cpupowerpc}
  621. default_target(source_info.system);
  622. {$else cpupowerpc}
  623. default_target(system_powerpc_linux);
  624. {$endif cpupowerpc}
  625. {$endif powerpc}
  626. {$ifdef sparc}
  627. {$ifdef cpusparc}
  628. default_target(source_info.system);
  629. {$else cpusparc}
  630. default_target(system_sparc_linux);
  631. {$endif cpusparc}
  632. {$endif sparc}
  633. {$ifdef arm}
  634. {$ifdef cpuarm}
  635. default_target(source_info.system);
  636. {$else cpuarm}
  637. default_target(system_arm_linux);
  638. {$endif cpuarm}
  639. {$endif arm}
  640. end;
  641. initialization
  642. source_info.name:='';
  643. finalization
  644. DeregisterInfos;
  645. end.