i_linux.pas 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993
  1. {
  2. Copyright (c) 1998-2008 by Peter Vreman
  3. This unit implements support information structures for linux
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. ****************************************************************************
  16. }
  17. { This unit implements support information structures for linux. }
  18. unit i_linux;
  19. {$i fpcdefs.inc}
  20. interface
  21. uses
  22. systems, rescmn;
  23. const
  24. system_i386_linux_info : tsysteminfo =
  25. (
  26. system : system_i386_LINUX;
  27. name : 'Linux for i386';
  28. shortname : 'Linux';
  29. flags : [tf_needs_symbol_size,tf_pic_uses_got{,tf_smartlink_sections}{,tf_winlikewidestring},
  30. {$ifdef segment_threadvars}
  31. tf_section_threadvars,
  32. {$endif segment_threadvars}
  33. tf_needs_symbol_type,tf_files_case_sensitive,
  34. tf_smartlink_library,tf_needs_dwarf_cfi,tf_has_winlike_resources,
  35. tf_safecall_exceptions, tf_safecall_clearstack];
  36. cpu : cpu_i386;
  37. unit_env : 'LINUXUNITS';
  38. extradefines : 'UNIX;HASUNIX';
  39. exeext : '';
  40. defext : '.def';
  41. scriptext : '.sh';
  42. smartext : '.sl';
  43. unitext : '.ppu';
  44. unitlibext : '.ppl';
  45. asmext : '.s';
  46. objext : '.o';
  47. resext : '.res';
  48. resobjext : '.or';
  49. sharedlibext : '.so';
  50. staticlibext : '.a';
  51. staticlibprefix : 'libp';
  52. sharedlibprefix : 'lib';
  53. sharedClibext : '.so';
  54. staticClibext : '.a';
  55. staticClibprefix : 'lib';
  56. sharedClibprefix : 'lib';
  57. importlibprefix : 'libimp';
  58. importlibext : '.a';
  59. Cprefix : '';
  60. newline : #10;
  61. dirsep : '/';
  62. assem : as_i386_elf32;
  63. assemextern : as_gas;
  64. link : nil;
  65. linkextern : nil;
  66. ar : ar_gnu_ar;
  67. res : res_elf;
  68. dbg : dbg_stabs;
  69. script : script_unix;
  70. endian : endian_little;
  71. alignment :
  72. (
  73. procalign : 16;
  74. loopalign : 4;
  75. jumpalign : 0;
  76. constalignmin : 0;
  77. constalignmax : 8;
  78. varalignmin : 0;
  79. varalignmax : 16;
  80. localalignmin : 4;
  81. localalignmax : 8;
  82. recordalignmin : 0;
  83. recordalignmax : 16;
  84. maxCrecordalign : 4
  85. );
  86. first_parm_offset : 8;
  87. stacksize : 8*1024*1024;
  88. stackalign : 4;
  89. abi : abi_default
  90. );
  91. system_x86_6432_linux_info : tsysteminfo =
  92. (
  93. system : system_x86_6432_LINUX;
  94. name : 'Linux for x64_6432';
  95. shortname : 'Linux6432';
  96. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  97. tf_pic_uses_got{,tf_smartlink_sections},
  98. tf_smartlink_library,tf_has_winlike_resources];
  99. cpu : cpu_x86_64;
  100. unit_env : 'LINUXUNITS';
  101. extradefines : 'UNIX;HASUNIX';
  102. exeext : '';
  103. defext : '.def';
  104. scriptext : '.sh';
  105. smartext : '.sl';
  106. unitext : '.ppu';
  107. unitlibext : '.ppl';
  108. asmext : '.s';
  109. objext : '.o';
  110. resext : '.res';
  111. resobjext : '.or';
  112. sharedlibext : '.so';
  113. staticlibext : '.a';
  114. staticlibprefix : 'libp';
  115. sharedlibprefix : 'lib';
  116. sharedClibext : '.so';
  117. staticClibext : '.a';
  118. staticClibprefix : 'lib';
  119. sharedClibprefix : 'lib';
  120. importlibprefix : 'libimp';
  121. importlibext : '.a';
  122. Cprefix : '';
  123. newline : #10;
  124. dirsep : '/';
  125. assem : as_i386_elf32;
  126. assemextern : as_gas;
  127. link : nil;
  128. linkextern : nil;
  129. ar : ar_gnu_ar;
  130. res : res_elf;
  131. dbg : dbg_stabs;
  132. script : script_unix;
  133. endian : endian_little;
  134. alignment :
  135. (
  136. procalign : 16;
  137. loopalign : 4;
  138. jumpalign : 0;
  139. constalignmin : 0;
  140. constalignmax : 16;
  141. varalignmin : 0;
  142. varalignmax : 16;
  143. localalignmin : 4;
  144. localalignmax : 8;
  145. recordalignmin : 0;
  146. recordalignmax : 16;
  147. maxCrecordalign : 4
  148. );
  149. first_parm_offset : 8;
  150. stacksize : 8*1024*1024;
  151. stackalign : 16;
  152. abi : abi_default
  153. );
  154. system_m68k_linux_info : tsysteminfo =
  155. (
  156. system : system_m68k_linux;
  157. name : 'Linux for m68k';
  158. shortname : 'Linux';
  159. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  160. tf_smartlink_library,tf_has_winlike_resources];
  161. cpu : cpu_m68k;
  162. unit_env : 'LINUXUNITS';
  163. extradefines : 'UNIX;HASUNIX';
  164. exeext : '';
  165. defext : '';
  166. scriptext : '.sh';
  167. smartext : '.sl';
  168. unitext : '.ppu';
  169. unitlibext : '.ppl';
  170. asmext : '.s';
  171. objext : '.o';
  172. resext : '.res';
  173. resobjext : '.or';
  174. sharedlibext : '.so';
  175. staticlibext : '.a';
  176. staticlibprefix : 'libp';
  177. sharedlibprefix : 'lib';
  178. sharedClibext : '.so';
  179. staticClibext : '.a';
  180. staticClibprefix : 'lib';
  181. sharedClibprefix : 'lib';
  182. importlibprefix : 'libimp';
  183. importlibext : '.a';
  184. Cprefix : '';
  185. newline : #10;
  186. dirsep : '/';
  187. assem : as_gas;
  188. assemextern : as_gas;
  189. link : nil;
  190. linkextern : nil;
  191. ar : ar_gnu_ar;
  192. res : res_elf;
  193. dbg : dbg_stabs;
  194. script : script_unix;
  195. endian : endian_big;
  196. alignment :
  197. (
  198. procalign : 4;
  199. loopalign : 4;
  200. jumpalign : 0;
  201. constalignmin : 0;
  202. constalignmax : 4;
  203. varalignmin : 0;
  204. varalignmax : 4;
  205. localalignmin : 4;
  206. localalignmax : 4;
  207. recordalignmin : 0;
  208. recordalignmax : 2;
  209. maxCrecordalign : 4
  210. );
  211. first_parm_offset : 8;
  212. stacksize : 32*1024*1024;
  213. stackalign : 4;
  214. abi : abi_default
  215. );
  216. system_powerpc_linux_info : tsysteminfo =
  217. (
  218. system : system_powerpc_LINUX;
  219. name : 'Linux for PowerPC';
  220. shortname : 'Linux';
  221. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  222. tf_smartlink_library,tf_has_winlike_resources];
  223. cpu : cpu_powerpc;
  224. unit_env : '';
  225. extradefines : 'UNIX;HASUNIX';
  226. exeext : '';
  227. defext : '.def';
  228. scriptext : '.sh';
  229. smartext : '.sl';
  230. unitext : '.ppu';
  231. unitlibext : '.ppl';
  232. asmext : '.s';
  233. objext : '.o';
  234. resext : '.res';
  235. resobjext : '.or';
  236. sharedlibext : '.so';
  237. staticlibext : '.a';
  238. staticlibprefix : 'libp';
  239. sharedlibprefix : 'lib';
  240. sharedClibext : '.so';
  241. staticClibext : '.a';
  242. staticClibprefix : 'lib';
  243. sharedClibprefix : 'lib';
  244. importlibprefix : 'libimp';
  245. importlibext : '.a';
  246. Cprefix : '';
  247. newline : #10;
  248. dirsep : '/';
  249. assem : as_gas;
  250. assemextern : as_gas;
  251. link : nil;
  252. linkextern : nil;
  253. ar : ar_gnu_ar;
  254. res : res_elf;
  255. dbg : dbg_stabs;
  256. script : script_unix;
  257. endian : endian_big;
  258. alignment :
  259. (
  260. procalign : 4;
  261. loopalign : 4;
  262. jumpalign : 0;
  263. constalignmin : 0;
  264. constalignmax : 4;
  265. varalignmin : 0;
  266. varalignmax : 4;
  267. localalignmin : 4;
  268. localalignmax : 4;
  269. recordalignmin : 0;
  270. recordalignmax : 4;
  271. maxCrecordalign : 8
  272. );
  273. first_parm_offset : 8;
  274. stacksize : 32*1024*1024;
  275. stackalign : 16;
  276. abi : abi_powerpc_sysv;
  277. );
  278. system_powerpc64_linux_info : tsysteminfo =
  279. (
  280. system : system_powerpc64_LINUX;
  281. name : 'Linux for PowerPC64';
  282. shortname : 'Linux';
  283. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  284. tf_requires_proper_alignment,tf_smartlink_sections,tf_has_winlike_resources];
  285. cpu : cpu_powerpc64;
  286. unit_env : '';
  287. extradefines : 'UNIX;HASUNIX';
  288. exeext : '';
  289. defext : '.def';
  290. scriptext : '.sh';
  291. smartext : '.sl';
  292. unitext : '.ppu';
  293. unitlibext : '.ppl';
  294. asmext : '.s';
  295. objext : '.o';
  296. resext : '.res';
  297. resobjext : '.or';
  298. sharedlibext : '.so';
  299. staticlibext : '.a';
  300. staticlibprefix : 'libp';
  301. sharedlibprefix : 'lib';
  302. sharedClibext : '.so';
  303. staticClibext : '.a';
  304. staticClibprefix : 'lib';
  305. sharedClibprefix : 'lib';
  306. importlibprefix : 'libimp';
  307. importlibext : '.a';
  308. Cprefix : '';
  309. newline : #10;
  310. dirsep : '/';
  311. assem : as_gas;
  312. assemextern : as_gas;
  313. link : nil;
  314. linkextern : nil;
  315. ar : ar_gnu_ar;
  316. res : res_elf;
  317. dbg : dbg_dwarf2;
  318. script : script_unix;
  319. endian : endian_big;
  320. alignment :
  321. (
  322. procalign : 8;
  323. loopalign : 4;
  324. jumpalign : 0;
  325. constalignmin : 4;
  326. constalignmax : 16;
  327. varalignmin : 4;
  328. varalignmax : 16;
  329. localalignmin : 0;
  330. localalignmax : 16;
  331. recordalignmin : 0;
  332. recordalignmax : 16;
  333. maxCrecordalign : 16
  334. );
  335. first_parm_offset : 8;
  336. stacksize : 10*1024*1024;
  337. stackalign : 16;
  338. abi : abi_powerpc_sysv
  339. );
  340. system_alpha_linux_info : tsysteminfo =
  341. (
  342. system : system_alpha_LINUX;
  343. name : 'Linux for Alpha';
  344. shortname : 'Linux';
  345. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  346. tf_smartlink_library,tf_has_winlike_resources];
  347. cpu : cpu_alpha;
  348. unit_env : 'LINUXUNITS';
  349. extradefines : 'UNIX;HASUNIX';
  350. exeext : '';
  351. defext : '.def';
  352. scriptext : '.sh';
  353. smartext : '.sl';
  354. unitext : '.ppu';
  355. unitlibext : '.ppl';
  356. asmext : '.s';
  357. objext : '.o';
  358. resext : '.res';
  359. resobjext : '.or';
  360. sharedlibext : '.so';
  361. staticlibext : '.a';
  362. staticlibprefix : 'libp';
  363. sharedlibprefix : 'lib';
  364. sharedClibext : '.so';
  365. staticClibext : '.a';
  366. staticClibprefix : 'lib';
  367. sharedClibprefix : 'lib';
  368. importlibprefix : 'libimp';
  369. importlibext : '.a';
  370. Cprefix : '';
  371. newline : #10;
  372. dirsep : '/';
  373. assem : as_gas;
  374. assemextern : as_gas;
  375. link : nil;
  376. linkextern : nil;
  377. ar : ar_gnu_ar;
  378. res : res_elf;
  379. dbg : dbg_stabs;
  380. script : script_unix;
  381. endian : endian_little;
  382. alignment :
  383. (
  384. procalign : 4;
  385. loopalign : 4;
  386. jumpalign : 0;
  387. constalignmin : 0;
  388. constalignmax : 4;
  389. varalignmin : 0;
  390. varalignmax : 4;
  391. localalignmin : 4;
  392. localalignmax : 4;
  393. recordalignmin : 0;
  394. recordalignmax : 2;
  395. maxCrecordalign : 4
  396. );
  397. first_parm_offset : 8;
  398. stacksize : 32*1024*1024;
  399. stackalign : 8; { ??? }
  400. abi : abi_default
  401. );
  402. system_x86_64_linux_info : tsysteminfo =
  403. (
  404. system : system_x86_64_LINUX;
  405. name : 'Linux for x86-64';
  406. shortname : 'Linux';
  407. flags : [tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_smartlink_library,
  408. tf_library_needs_pic,tf_needs_symbol_type,tf_files_case_sensitive,
  409. tf_has_winlike_resources,tf_safecall_exceptions,tf_safecall_clearstack];
  410. cpu : cpu_x86_64;
  411. unit_env : 'LINUXUNITS';
  412. extradefines : 'UNIX;HASUNIX';
  413. exeext : '';
  414. defext : '.def';
  415. scriptext : '.sh';
  416. smartext : '.sl';
  417. unitext : '.ppu';
  418. unitlibext : '.ppl';
  419. asmext : '.s';
  420. objext : '.o';
  421. resext : '.res';
  422. resobjext : '.or';
  423. sharedlibext : '.so';
  424. staticlibext : '.a';
  425. staticlibprefix : 'libp';
  426. sharedlibprefix : 'lib';
  427. sharedClibext : '.so';
  428. staticClibext : '.a';
  429. staticClibprefix : 'lib';
  430. sharedClibprefix : 'lib';
  431. importlibprefix : 'libimp';
  432. importlibext : '.a';
  433. Cprefix : '';
  434. newline : #10;
  435. dirsep : '/';
  436. assem : as_x86_64_elf64;
  437. assemextern : as_gas;
  438. link : nil;
  439. linkextern : nil;
  440. ar : ar_gnu_ar;
  441. res : res_elf;
  442. dbg : dbg_dwarf2;
  443. script : script_unix;
  444. endian : endian_little;
  445. alignment :
  446. (
  447. procalign : 16;
  448. loopalign : 8;
  449. jumpalign : 0;
  450. constalignmin : 0;
  451. constalignmax : 8;
  452. varalignmin : 0;
  453. varalignmax : 16;
  454. localalignmin : 4;
  455. localalignmax : 16;
  456. recordalignmin : 0;
  457. recordalignmax : 16;
  458. maxCrecordalign : 16
  459. );
  460. first_parm_offset : 16;
  461. stacksize : 8*1024*1024;
  462. stackalign : 16;
  463. abi : abi_default
  464. );
  465. system_sparc_linux_info : tsysteminfo =
  466. (
  467. system : system_SPARC_Linux;
  468. name : 'Linux for SPARC';
  469. shortname : 'Linux';
  470. flags : [tf_needs_symbol_size,tf_library_needs_pic,tf_smartlink_sections,
  471. tf_needs_symbol_type,tf_files_case_sensitive,tf_smartlink_library,
  472. tf_requires_proper_alignment,
  473. tf_has_winlike_resources];
  474. cpu : cpu_SPARC;
  475. unit_env : 'LINUXUNITS';
  476. extradefines : 'UNIX;HASUNIX';
  477. exeext : '';
  478. defext : '.def';
  479. scriptext : '.sh';
  480. smartext : '.sl';
  481. unitext : '.ppu';
  482. unitlibext : '.ppl';
  483. asmext : '.s';
  484. objext : '.o';
  485. resext : '.res';
  486. resobjext : '.or';
  487. sharedlibext : '.so';
  488. staticlibext : '.a';
  489. staticlibprefix : 'libp';
  490. sharedlibprefix : 'lib';
  491. sharedClibext : '.so';
  492. staticClibext : '.a';
  493. staticClibprefix : 'lib';
  494. sharedClibprefix : 'lib';
  495. importlibprefix : 'libimp';
  496. importlibext : '.a';
  497. Cprefix : '';
  498. newline : #10;
  499. dirsep : '/';
  500. assem : as_gas;
  501. assemextern : as_gas;
  502. link : nil;
  503. linkextern : nil;
  504. ar : ar_gnu_ar;
  505. res : res_elf;
  506. dbg : dbg_stabs;
  507. script : script_unix;
  508. endian : endian_big;
  509. alignment :
  510. (
  511. procalign : 4;
  512. loopalign : 4;
  513. jumpalign : 0;
  514. constalignmin : 4;
  515. constalignmax : 8;
  516. varalignmin : 4;
  517. varalignmax : 8;
  518. localalignmin : 4;
  519. localalignmax : 8;
  520. recordalignmin : 0;
  521. recordalignmax : 8;
  522. maxCrecordalign : 8
  523. );
  524. first_parm_offset : 92;
  525. stacksize : 8*1024*1024;
  526. stackalign : 8;
  527. abi : abi_default
  528. );
  529. {$ifdef FPC_ARMHF}
  530. system_arm_linux_info : tsysteminfo =
  531. (
  532. system : system_arm_Linux;
  533. name : 'Linux for ARMHF';
  534. shortname : 'Linux';
  535. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  536. tf_requires_proper_alignment,
  537. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  538. cpu : cpu_arm;
  539. unit_env : 'LINUXUNITS';
  540. extradefines : 'UNIX;HASUNIX;CPUARMHF';
  541. exeext : '';
  542. defext : '.def';
  543. scriptext : '.sh';
  544. smartext : '.sl';
  545. unitext : '.ppu';
  546. unitlibext : '.ppl';
  547. asmext : '.s';
  548. objext : '.o';
  549. resext : '.res';
  550. resobjext : '.or';
  551. sharedlibext : '.so';
  552. staticlibext : '.a';
  553. staticlibprefix : 'libp';
  554. sharedlibprefix : 'lib';
  555. sharedClibext : '.so';
  556. staticClibext : '.a';
  557. staticClibprefix : 'lib';
  558. sharedClibprefix : 'lib';
  559. importlibprefix : 'libimp';
  560. importlibext : '.a';
  561. Cprefix : '';
  562. newline : #10;
  563. dirsep : '/';
  564. assem : as_gas;
  565. assemextern : as_gas;
  566. link : nil;
  567. linkextern : nil;
  568. ar : ar_gnu_ar;
  569. res : res_elf;
  570. dbg : dbg_stabs;
  571. script : script_unix;
  572. endian : endian_little;
  573. alignment :
  574. (
  575. procalign : 4;
  576. loopalign : 4;
  577. jumpalign : 0;
  578. constalignmin : 0;
  579. constalignmax : 8;
  580. varalignmin : 0;
  581. varalignmax : 8;
  582. localalignmin : 4;
  583. localalignmax : 8;
  584. recordalignmin : 0;
  585. recordalignmax : 8;
  586. maxCrecordalign : 8
  587. );
  588. first_parm_offset : 8;
  589. stacksize : 8*1024*1024;
  590. stackalign : 8;
  591. abi : abi_eabihf
  592. );
  593. {$else FPC_ARMHF}
  594. {$ifdef FPC_ARMEL}
  595. system_arm_linux_info : tsysteminfo =
  596. (
  597. system : system_arm_Linux;
  598. name : 'Linux for ARMEL';
  599. shortname : 'Linux';
  600. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  601. tf_requires_proper_alignment,
  602. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  603. cpu : cpu_arm;
  604. unit_env : 'LINUXUNITS';
  605. extradefines : 'UNIX;HASUNIX;CPUARMEL';
  606. exeext : '';
  607. defext : '.def';
  608. scriptext : '.sh';
  609. smartext : '.sl';
  610. unitext : '.ppu';
  611. unitlibext : '.ppl';
  612. asmext : '.s';
  613. objext : '.o';
  614. resext : '.res';
  615. resobjext : '.or';
  616. sharedlibext : '.so';
  617. staticlibext : '.a';
  618. staticlibprefix : 'libp';
  619. sharedlibprefix : 'lib';
  620. sharedClibext : '.so';
  621. staticClibext : '.a';
  622. staticClibprefix : 'lib';
  623. sharedClibprefix : 'lib';
  624. importlibprefix : 'libimp';
  625. importlibext : '.a';
  626. Cprefix : '';
  627. newline : #10;
  628. dirsep : '/';
  629. assem : as_gas;
  630. assemextern : as_gas;
  631. link : nil;
  632. linkextern : nil;
  633. ar : ar_gnu_ar;
  634. res : res_elf;
  635. dbg : dbg_stabs;
  636. script : script_unix;
  637. endian : endian_little;
  638. alignment :
  639. (
  640. procalign : 4;
  641. loopalign : 4;
  642. jumpalign : 0;
  643. constalignmin : 0;
  644. constalignmax : 8;
  645. varalignmin : 0;
  646. varalignmax : 8;
  647. localalignmin : 4;
  648. localalignmax : 8;
  649. recordalignmin : 0;
  650. recordalignmax : 8;
  651. maxCrecordalign : 8
  652. );
  653. first_parm_offset : 8;
  654. stacksize : 8*1024*1024;
  655. stackalign : 8;
  656. abi : abi_eabi
  657. );
  658. {$else FPC_ARMEL}
  659. {$ifdef FPC_ARMEB}
  660. system_arm_linux_info : tsysteminfo =
  661. (
  662. system : system_arm_Linux;
  663. name : 'Linux for ARMEB';
  664. shortname : 'Linux';
  665. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  666. tf_requires_proper_alignment,
  667. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  668. cpu : cpu_arm;
  669. unit_env : 'LINUXUNITS';
  670. extradefines : 'UNIX;HASUNIX;CPUARMEB';
  671. exeext : '';
  672. defext : '.def';
  673. scriptext : '.sh';
  674. smartext : '.sl';
  675. unitext : '.ppu';
  676. unitlibext : '.ppl';
  677. asmext : '.s';
  678. objext : '.o';
  679. resext : '.res';
  680. resobjext : '.or';
  681. sharedlibext : '.so';
  682. staticlibext : '.a';
  683. staticlibprefix : 'libp';
  684. sharedlibprefix : 'lib';
  685. sharedClibext : '.so';
  686. staticClibext : '.a';
  687. staticClibprefix : 'lib';
  688. sharedClibprefix : 'lib';
  689. importlibprefix : 'libimp';
  690. importlibext : '.a';
  691. Cprefix : '';
  692. newline : #10;
  693. dirsep : '/';
  694. assem : as_gas;
  695. assemextern : as_gas;
  696. link : nil;
  697. linkextern : nil;
  698. ar : ar_gnu_ar;
  699. res : res_elf;
  700. dbg : dbg_stabs;
  701. script : script_unix;
  702. endian : endian_big;
  703. alignment :
  704. (
  705. procalign : 4;
  706. loopalign : 4;
  707. jumpalign : 0;
  708. constalignmin : 0;
  709. constalignmax : 4;
  710. varalignmin : 0;
  711. varalignmax : 4;
  712. localalignmin : 4;
  713. localalignmax : 8;
  714. recordalignmin : 0;
  715. recordalignmax : 4;
  716. maxCrecordalign : 4
  717. );
  718. first_parm_offset : 8;
  719. stacksize : 8*1024*1024;
  720. stackalign : 4;
  721. abi : abi_default
  722. );
  723. {$else FPC_ARMEB}
  724. system_arm_linux_info : tsysteminfo =
  725. (
  726. system : system_arm_Linux;
  727. name : 'Linux for ARM';
  728. shortname : 'Linux';
  729. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  730. tf_requires_proper_alignment,
  731. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  732. cpu : cpu_arm;
  733. unit_env : 'LINUXUNITS';
  734. extradefines : 'UNIX;HASUNIX';
  735. exeext : '';
  736. defext : '.def';
  737. scriptext : '.sh';
  738. smartext : '.sl';
  739. unitext : '.ppu';
  740. unitlibext : '.ppl';
  741. asmext : '.s';
  742. objext : '.o';
  743. resext : '.res';
  744. resobjext : '.or';
  745. sharedlibext : '.so';
  746. staticlibext : '.a';
  747. staticlibprefix : 'libp';
  748. sharedlibprefix : 'lib';
  749. sharedClibext : '.so';
  750. staticClibext : '.a';
  751. staticClibprefix : 'lib';
  752. sharedClibprefix : 'lib';
  753. importlibprefix : 'libimp';
  754. importlibext : '.a';
  755. Cprefix : '';
  756. newline : #10;
  757. dirsep : '/';
  758. assem : as_gas;
  759. assemextern : as_gas;
  760. link : nil;
  761. linkextern : nil;
  762. ar : ar_gnu_ar;
  763. res : res_elf;
  764. dbg : dbg_stabs;
  765. script : script_unix;
  766. endian : endian_little;
  767. alignment :
  768. (
  769. procalign : 4;
  770. loopalign : 4;
  771. jumpalign : 0;
  772. constalignmin : 0;
  773. constalignmax : 4;
  774. varalignmin : 0;
  775. varalignmax : 4;
  776. localalignmin : 4;
  777. localalignmax : 4;
  778. recordalignmin : 0;
  779. recordalignmax : 4;
  780. maxCrecordalign : 4
  781. );
  782. first_parm_offset : 8;
  783. stacksize : 8*1024*1024;
  784. stackalign : 4;
  785. abi : abi_default
  786. );
  787. {$endif FPC_ARMEB}
  788. {$endif FPC_ARMEL}
  789. {$endif FPC_ARMHF}
  790. system_mipseb_linux_info : tsysteminfo =
  791. (
  792. system : system_mipseb_LINUX;
  793. name : 'Linux for MIPSEB';
  794. shortname : 'Linux';
  795. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  796. tf_requires_proper_alignment,
  797. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  798. cpu : cpu_mipseb;
  799. unit_env : 'LINUXUNITS';
  800. extradefines : 'UNIX;HASUNIX';
  801. exeext : '';
  802. defext : '.def';
  803. scriptext : '.sh';
  804. smartext : '.sl';
  805. unitext : '.ppu';
  806. unitlibext : '.ppl';
  807. asmext : '.s';
  808. objext : '.o';
  809. resext : '.res';
  810. resobjext : '.or';
  811. sharedlibext : '.so';
  812. staticlibext : '.a';
  813. staticlibprefix : 'libp';
  814. sharedlibprefix : 'lib';
  815. sharedClibext : '.so';
  816. staticClibext : '.a';
  817. staticClibprefix : 'lib';
  818. sharedClibprefix : 'lib';
  819. importlibprefix : 'libimp';
  820. importlibext : '.a';
  821. // p_ext_support : false;
  822. Cprefix : '';
  823. newline : #10;
  824. dirsep : '/';
  825. assem : as_gas;
  826. assemextern : as_gas;
  827. link : nil;
  828. linkextern : nil;
  829. ar : ar_gnu_ar;
  830. res : res_none;
  831. dbg : dbg_stabs;
  832. script : script_unix;
  833. endian : endian_big;
  834. alignment :
  835. (
  836. procalign : 4;
  837. loopalign : 4;
  838. jumpalign : 0;
  839. constalignmin : 0;
  840. constalignmax : 8;
  841. varalignmin : 0;
  842. varalignmax : 8;
  843. localalignmin : 4;
  844. localalignmax : 8;
  845. recordalignmin : 0;
  846. recordalignmax : 8;
  847. maxCrecordalign : 8
  848. );
  849. first_parm_offset : 0;
  850. stacksize : 32*1024*1024;
  851. stackalign : 8;
  852. abi : abi_default
  853. );
  854. system_mipsel_linux_info : tsysteminfo =
  855. (
  856. system : system_mipsel_LINUX;
  857. name : 'Linux for MIPSEL';
  858. shortname : 'Linux';
  859. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  860. tf_requires_proper_alignment,
  861. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  862. cpu : cpu_mipsel;
  863. unit_env : 'LINUXUNITS';
  864. extradefines : 'UNIX;HASUNIX';
  865. exeext : '';
  866. defext : '.def';
  867. scriptext : '.sh';
  868. smartext : '.sl';
  869. unitext : '.ppu';
  870. unitlibext : '.ppl';
  871. asmext : '.s';
  872. objext : '.o';
  873. resext : '.res';
  874. resobjext : '.or';
  875. sharedlibext : '.so';
  876. staticlibext : '.a';
  877. staticlibprefix : 'libp';
  878. sharedlibprefix : 'lib';
  879. sharedClibext : '.so';
  880. staticClibext : '.a';
  881. staticClibprefix : 'lib';
  882. sharedClibprefix : 'lib';
  883. importlibprefix : 'libimp';
  884. importlibext : '.a';
  885. // p_ext_support : false;
  886. Cprefix : '';
  887. newline : #10;
  888. dirsep : '/';
  889. assem : as_gas;
  890. assemextern : as_gas;
  891. link : nil;
  892. linkextern : nil;
  893. ar : ar_gnu_ar;
  894. res : res_none;
  895. dbg : dbg_stabs;
  896. script : script_unix;
  897. endian : endian_little;
  898. alignment :
  899. (
  900. procalign : 4;
  901. loopalign : 4;
  902. jumpalign : 0;
  903. constalignmin : 0;
  904. constalignmax : 8;
  905. varalignmin : 0;
  906. varalignmax : 8;
  907. localalignmin : 4;
  908. localalignmax : 8;
  909. recordalignmin : 0;
  910. recordalignmax : 8;
  911. maxCrecordalign : 8
  912. );
  913. first_parm_offset : 0;
  914. stacksize : 32*1024*1024;
  915. stackalign : 8;
  916. abi : abi_default
  917. );
  918. implementation
  919. initialization
  920. {$ifdef CPU86}
  921. {$ifdef linux}
  922. { some FreeBSD versions define linux as well }
  923. {$ifndef FreeBSD}
  924. set_source_info(system_i386_linux_info);
  925. {$endif FreeBSD}
  926. {$endif}
  927. {$endif CPU86}
  928. {$ifdef CPU68}
  929. {$ifdef linux}
  930. set_source_info(system_m68k_linux_info);
  931. {$endif linux}
  932. {$endif CPU68}
  933. {$ifdef CPUX86_64}
  934. {$ifdef linux}
  935. set_source_info(system_x86_64_linux_info);
  936. {$endif linux}
  937. {$endif CPUX86_64}
  938. {$ifdef CPUALPHA}
  939. {$ifdef linux}
  940. set_source_info(system_alpha_linux_info);
  941. {$endif linux}
  942. {$endif CPUALPHA}
  943. {$ifdef CPUSPARC}
  944. {$ifdef linux}
  945. set_source_info(system_sparc_linux_info);
  946. {$endif linux}
  947. {$endif CPUSPARC}
  948. {$ifdef CPUPOWERPC32}
  949. {$ifdef linux}
  950. set_source_info(system_powerpc_linux_info);
  951. {$endif linux}
  952. {$endif CPUPOWERPC32}
  953. {$ifdef CPUPOWERPC64}
  954. {$ifdef linux}
  955. set_source_info(system_powerpc64_linux_info);
  956. {$endif linux}
  957. {$endif CPUPOWERPC64}
  958. {$ifdef CPUARM}
  959. {$ifdef linux}
  960. set_source_info(system_arm_linux_info);
  961. {$endif linux}
  962. {$endif CPUARM}
  963. {$ifdef CPUMIPSEB}
  964. {$ifdef linux}
  965. set_source_info(system_mipseb_linux_info);
  966. {$endif linux}
  967. {$endif CPUMIPSEB}
  968. {$ifdef CPUMIPSEL}
  969. {$ifdef linux}
  970. set_source_info(system_mipsel_linux_info);
  971. {$endif linux}
  972. {$endif CPUMIPSEL}
  973. end.