i_linux.pas 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994
  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,
  472. tf_smartlink_library,tf_pic_uses_got,
  473. tf_requires_proper_alignment,tf_safecall_exceptions, tf_safecall_clearstack,
  474. tf_has_winlike_resources];
  475. cpu : cpu_SPARC;
  476. unit_env : 'LINUXUNITS';
  477. extradefines : 'UNIX;HASUNIX';
  478. exeext : '';
  479. defext : '.def';
  480. scriptext : '.sh';
  481. smartext : '.sl';
  482. unitext : '.ppu';
  483. unitlibext : '.ppl';
  484. asmext : '.s';
  485. objext : '.o';
  486. resext : '.res';
  487. resobjext : '.or';
  488. sharedlibext : '.so';
  489. staticlibext : '.a';
  490. staticlibprefix : 'libp';
  491. sharedlibprefix : 'lib';
  492. sharedClibext : '.so';
  493. staticClibext : '.a';
  494. staticClibprefix : 'lib';
  495. sharedClibprefix : 'lib';
  496. importlibprefix : 'libimp';
  497. importlibext : '.a';
  498. Cprefix : '';
  499. newline : #10;
  500. dirsep : '/';
  501. assem : as_gas;
  502. assemextern : as_gas;
  503. link : nil;
  504. linkextern : nil;
  505. ar : ar_gnu_ar;
  506. res : res_elf;
  507. dbg : dbg_stabs;
  508. script : script_unix;
  509. endian : endian_big;
  510. alignment :
  511. (
  512. procalign : 4;
  513. loopalign : 4;
  514. jumpalign : 0;
  515. constalignmin : 4;
  516. constalignmax : 8;
  517. varalignmin : 4;
  518. varalignmax : 8;
  519. localalignmin : 4;
  520. localalignmax : 8;
  521. recordalignmin : 0;
  522. recordalignmax : 8;
  523. maxCrecordalign : 8
  524. );
  525. first_parm_offset : 92;
  526. stacksize : 8*1024*1024;
  527. stackalign : 8;
  528. abi : abi_default
  529. );
  530. {$ifdef FPC_ARMHF}
  531. system_arm_linux_info : tsysteminfo =
  532. (
  533. system : system_arm_Linux;
  534. name : 'Linux for ARMHF';
  535. shortname : 'Linux';
  536. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  537. tf_requires_proper_alignment,
  538. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  539. cpu : cpu_arm;
  540. unit_env : 'LINUXUNITS';
  541. extradefines : 'UNIX;HASUNIX;CPUARMHF';
  542. exeext : '';
  543. defext : '.def';
  544. scriptext : '.sh';
  545. smartext : '.sl';
  546. unitext : '.ppu';
  547. unitlibext : '.ppl';
  548. asmext : '.s';
  549. objext : '.o';
  550. resext : '.res';
  551. resobjext : '.or';
  552. sharedlibext : '.so';
  553. staticlibext : '.a';
  554. staticlibprefix : 'libp';
  555. sharedlibprefix : 'lib';
  556. sharedClibext : '.so';
  557. staticClibext : '.a';
  558. staticClibprefix : 'lib';
  559. sharedClibprefix : 'lib';
  560. importlibprefix : 'libimp';
  561. importlibext : '.a';
  562. Cprefix : '';
  563. newline : #10;
  564. dirsep : '/';
  565. assem : as_gas;
  566. assemextern : as_gas;
  567. link : nil;
  568. linkextern : nil;
  569. ar : ar_gnu_ar;
  570. res : res_elf;
  571. dbg : dbg_stabs;
  572. script : script_unix;
  573. endian : endian_little;
  574. alignment :
  575. (
  576. procalign : 4;
  577. loopalign : 4;
  578. jumpalign : 0;
  579. constalignmin : 0;
  580. constalignmax : 8;
  581. varalignmin : 0;
  582. varalignmax : 8;
  583. localalignmin : 4;
  584. localalignmax : 8;
  585. recordalignmin : 0;
  586. recordalignmax : 8;
  587. maxCrecordalign : 8
  588. );
  589. first_parm_offset : 8;
  590. stacksize : 8*1024*1024;
  591. stackalign : 8;
  592. abi : abi_eabihf
  593. );
  594. {$else FPC_ARMHF}
  595. {$ifdef FPC_ARMEL}
  596. system_arm_linux_info : tsysteminfo =
  597. (
  598. system : system_arm_Linux;
  599. name : 'Linux for ARMEL';
  600. shortname : 'Linux';
  601. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  602. tf_requires_proper_alignment,
  603. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  604. cpu : cpu_arm;
  605. unit_env : 'LINUXUNITS';
  606. extradefines : 'UNIX;HASUNIX;CPUARMEL';
  607. exeext : '';
  608. defext : '.def';
  609. scriptext : '.sh';
  610. smartext : '.sl';
  611. unitext : '.ppu';
  612. unitlibext : '.ppl';
  613. asmext : '.s';
  614. objext : '.o';
  615. resext : '.res';
  616. resobjext : '.or';
  617. sharedlibext : '.so';
  618. staticlibext : '.a';
  619. staticlibprefix : 'libp';
  620. sharedlibprefix : 'lib';
  621. sharedClibext : '.so';
  622. staticClibext : '.a';
  623. staticClibprefix : 'lib';
  624. sharedClibprefix : 'lib';
  625. importlibprefix : 'libimp';
  626. importlibext : '.a';
  627. Cprefix : '';
  628. newline : #10;
  629. dirsep : '/';
  630. assem : as_gas;
  631. assemextern : as_gas;
  632. link : nil;
  633. linkextern : nil;
  634. ar : ar_gnu_ar;
  635. res : res_elf;
  636. dbg : dbg_stabs;
  637. script : script_unix;
  638. endian : endian_little;
  639. alignment :
  640. (
  641. procalign : 4;
  642. loopalign : 4;
  643. jumpalign : 0;
  644. constalignmin : 0;
  645. constalignmax : 8;
  646. varalignmin : 0;
  647. varalignmax : 8;
  648. localalignmin : 4;
  649. localalignmax : 8;
  650. recordalignmin : 0;
  651. recordalignmax : 8;
  652. maxCrecordalign : 8
  653. );
  654. first_parm_offset : 8;
  655. stacksize : 8*1024*1024;
  656. stackalign : 8;
  657. abi : abi_eabi
  658. );
  659. {$else FPC_ARMEL}
  660. {$ifdef FPC_ARMEB}
  661. system_arm_linux_info : tsysteminfo =
  662. (
  663. system : system_arm_Linux;
  664. name : 'Linux for ARMEB';
  665. shortname : 'Linux';
  666. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  667. tf_requires_proper_alignment,
  668. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  669. cpu : cpu_arm;
  670. unit_env : 'LINUXUNITS';
  671. extradefines : 'UNIX;HASUNIX;CPUARMEB';
  672. exeext : '';
  673. defext : '.def';
  674. scriptext : '.sh';
  675. smartext : '.sl';
  676. unitext : '.ppu';
  677. unitlibext : '.ppl';
  678. asmext : '.s';
  679. objext : '.o';
  680. resext : '.res';
  681. resobjext : '.or';
  682. sharedlibext : '.so';
  683. staticlibext : '.a';
  684. staticlibprefix : 'libp';
  685. sharedlibprefix : 'lib';
  686. sharedClibext : '.so';
  687. staticClibext : '.a';
  688. staticClibprefix : 'lib';
  689. sharedClibprefix : 'lib';
  690. importlibprefix : 'libimp';
  691. importlibext : '.a';
  692. Cprefix : '';
  693. newline : #10;
  694. dirsep : '/';
  695. assem : as_gas;
  696. assemextern : as_gas;
  697. link : nil;
  698. linkextern : nil;
  699. ar : ar_gnu_ar;
  700. res : res_elf;
  701. dbg : dbg_stabs;
  702. script : script_unix;
  703. endian : endian_big;
  704. alignment :
  705. (
  706. procalign : 4;
  707. loopalign : 4;
  708. jumpalign : 0;
  709. constalignmin : 0;
  710. constalignmax : 4;
  711. varalignmin : 0;
  712. varalignmax : 4;
  713. localalignmin : 4;
  714. localalignmax : 8;
  715. recordalignmin : 0;
  716. recordalignmax : 4;
  717. maxCrecordalign : 4
  718. );
  719. first_parm_offset : 8;
  720. stacksize : 8*1024*1024;
  721. stackalign : 4;
  722. abi : abi_default
  723. );
  724. {$else FPC_ARMEB}
  725. system_arm_linux_info : tsysteminfo =
  726. (
  727. system : system_arm_Linux;
  728. name : 'Linux for ARM';
  729. shortname : 'Linux';
  730. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  731. tf_requires_proper_alignment,
  732. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  733. cpu : cpu_arm;
  734. unit_env : 'LINUXUNITS';
  735. extradefines : 'UNIX;HASUNIX';
  736. exeext : '';
  737. defext : '.def';
  738. scriptext : '.sh';
  739. smartext : '.sl';
  740. unitext : '.ppu';
  741. unitlibext : '.ppl';
  742. asmext : '.s';
  743. objext : '.o';
  744. resext : '.res';
  745. resobjext : '.or';
  746. sharedlibext : '.so';
  747. staticlibext : '.a';
  748. staticlibprefix : 'libp';
  749. sharedlibprefix : 'lib';
  750. sharedClibext : '.so';
  751. staticClibext : '.a';
  752. staticClibprefix : 'lib';
  753. sharedClibprefix : 'lib';
  754. importlibprefix : 'libimp';
  755. importlibext : '.a';
  756. Cprefix : '';
  757. newline : #10;
  758. dirsep : '/';
  759. assem : as_gas;
  760. assemextern : as_gas;
  761. link : nil;
  762. linkextern : nil;
  763. ar : ar_gnu_ar;
  764. res : res_elf;
  765. dbg : dbg_stabs;
  766. script : script_unix;
  767. endian : endian_little;
  768. alignment :
  769. (
  770. procalign : 4;
  771. loopalign : 4;
  772. jumpalign : 0;
  773. constalignmin : 0;
  774. constalignmax : 4;
  775. varalignmin : 0;
  776. varalignmax : 4;
  777. localalignmin : 4;
  778. localalignmax : 4;
  779. recordalignmin : 0;
  780. recordalignmax : 4;
  781. maxCrecordalign : 4
  782. );
  783. first_parm_offset : 8;
  784. stacksize : 8*1024*1024;
  785. stackalign : 4;
  786. abi : abi_default
  787. );
  788. {$endif FPC_ARMEB}
  789. {$endif FPC_ARMEL}
  790. {$endif FPC_ARMHF}
  791. system_mipseb_linux_info : tsysteminfo =
  792. (
  793. system : system_mipseb_LINUX;
  794. name : 'Linux for MIPSEB';
  795. shortname : 'Linux';
  796. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  797. tf_requires_proper_alignment,
  798. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  799. cpu : cpu_mipseb;
  800. unit_env : 'LINUXUNITS';
  801. extradefines : 'UNIX;HASUNIX';
  802. exeext : '';
  803. defext : '.def';
  804. scriptext : '.sh';
  805. smartext : '.sl';
  806. unitext : '.ppu';
  807. unitlibext : '.ppl';
  808. asmext : '.s';
  809. objext : '.o';
  810. resext : '.res';
  811. resobjext : '.or';
  812. sharedlibext : '.so';
  813. staticlibext : '.a';
  814. staticlibprefix : 'libp';
  815. sharedlibprefix : 'lib';
  816. sharedClibext : '.so';
  817. staticClibext : '.a';
  818. staticClibprefix : 'lib';
  819. sharedClibprefix : 'lib';
  820. importlibprefix : 'libimp';
  821. importlibext : '.a';
  822. // p_ext_support : false;
  823. Cprefix : '';
  824. newline : #10;
  825. dirsep : '/';
  826. assem : as_gas;
  827. assemextern : as_gas;
  828. link : nil;
  829. linkextern : nil;
  830. ar : ar_gnu_ar;
  831. res : res_elf;
  832. dbg : dbg_stabs;
  833. script : script_unix;
  834. endian : endian_big;
  835. alignment :
  836. (
  837. procalign : 4;
  838. loopalign : 4;
  839. jumpalign : 0;
  840. constalignmin : 0;
  841. constalignmax : 8;
  842. varalignmin : 0;
  843. varalignmax : 8;
  844. localalignmin : 4;
  845. localalignmax : 8;
  846. recordalignmin : 0;
  847. recordalignmax : 8;
  848. maxCrecordalign : 8
  849. );
  850. first_parm_offset : 0;
  851. stacksize : 32*1024*1024;
  852. stackalign : 8;
  853. abi : abi_default
  854. );
  855. system_mipsel_linux_info : tsysteminfo =
  856. (
  857. system : system_mipsel_LINUX;
  858. name : 'Linux for MIPSEL';
  859. shortname : 'Linux';
  860. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  861. tf_requires_proper_alignment,
  862. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  863. cpu : cpu_mipsel;
  864. unit_env : 'LINUXUNITS';
  865. extradefines : 'UNIX;HASUNIX';
  866. exeext : '';
  867. defext : '.def';
  868. scriptext : '.sh';
  869. smartext : '.sl';
  870. unitext : '.ppu';
  871. unitlibext : '.ppl';
  872. asmext : '.s';
  873. objext : '.o';
  874. resext : '.res';
  875. resobjext : '.or';
  876. sharedlibext : '.so';
  877. staticlibext : '.a';
  878. staticlibprefix : 'libp';
  879. sharedlibprefix : 'lib';
  880. sharedClibext : '.so';
  881. staticClibext : '.a';
  882. staticClibprefix : 'lib';
  883. sharedClibprefix : 'lib';
  884. importlibprefix : 'libimp';
  885. importlibext : '.a';
  886. // p_ext_support : false;
  887. Cprefix : '';
  888. newline : #10;
  889. dirsep : '/';
  890. assem : as_gas;
  891. assemextern : as_gas;
  892. link : nil;
  893. linkextern : nil;
  894. ar : ar_gnu_ar;
  895. res : res_elf;
  896. dbg : dbg_stabs;
  897. script : script_unix;
  898. endian : endian_little;
  899. alignment :
  900. (
  901. procalign : 4;
  902. loopalign : 4;
  903. jumpalign : 0;
  904. constalignmin : 0;
  905. constalignmax : 8;
  906. varalignmin : 0;
  907. varalignmax : 8;
  908. localalignmin : 4;
  909. localalignmax : 8;
  910. recordalignmin : 0;
  911. recordalignmax : 8;
  912. maxCrecordalign : 8
  913. );
  914. first_parm_offset : 0;
  915. stacksize : 32*1024*1024;
  916. stackalign : 8;
  917. abi : abi_default
  918. );
  919. implementation
  920. initialization
  921. {$ifdef CPU86}
  922. {$ifdef linux}
  923. { some FreeBSD versions define linux as well }
  924. {$ifndef FreeBSD}
  925. set_source_info(system_i386_linux_info);
  926. {$endif FreeBSD}
  927. {$endif}
  928. {$endif CPU86}
  929. {$ifdef CPU68}
  930. {$ifdef linux}
  931. set_source_info(system_m68k_linux_info);
  932. {$endif linux}
  933. {$endif CPU68}
  934. {$ifdef CPUX86_64}
  935. {$ifdef linux}
  936. set_source_info(system_x86_64_linux_info);
  937. {$endif linux}
  938. {$endif CPUX86_64}
  939. {$ifdef CPUALPHA}
  940. {$ifdef linux}
  941. set_source_info(system_alpha_linux_info);
  942. {$endif linux}
  943. {$endif CPUALPHA}
  944. {$ifdef CPUSPARC}
  945. {$ifdef linux}
  946. set_source_info(system_sparc_linux_info);
  947. {$endif linux}
  948. {$endif CPUSPARC}
  949. {$ifdef CPUPOWERPC32}
  950. {$ifdef linux}
  951. set_source_info(system_powerpc_linux_info);
  952. {$endif linux}
  953. {$endif CPUPOWERPC32}
  954. {$ifdef CPUPOWERPC64}
  955. {$ifdef linux}
  956. set_source_info(system_powerpc64_linux_info);
  957. {$endif linux}
  958. {$endif CPUPOWERPC64}
  959. {$ifdef CPUARM}
  960. {$ifdef linux}
  961. set_source_info(system_arm_linux_info);
  962. {$endif linux}
  963. {$endif CPUARM}
  964. {$ifdef CPUMIPSEB}
  965. {$ifdef linux}
  966. set_source_info(system_mipseb_linux_info);
  967. {$endif linux}
  968. {$endif CPUMIPSEB}
  969. {$ifdef CPUMIPSEL}
  970. {$ifdef linux}
  971. set_source_info(system_mipsel_linux_info);
  972. {$endif linux}
  973. {$endif CPUMIPSEL}
  974. end.