i_linux.pas 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000
  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 : ld_none;
  65. linkextern : ld_linux;
  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 : ld_none;
  128. linkextern : ld_linux;
  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_sections,
  161. tf_requires_proper_alignment, { Coldfire seems to need this at least (KB) }
  162. tf_smartlink_library,tf_has_winlike_resources];
  163. cpu : cpu_m68k;
  164. unit_env : 'LINUXUNITS';
  165. extradefines : 'UNIX;HASUNIX';
  166. exeext : '';
  167. defext : '';
  168. scriptext : '.sh';
  169. smartext : '.sl';
  170. unitext : '.ppu';
  171. unitlibext : '.ppl';
  172. asmext : '.s';
  173. objext : '.o';
  174. resext : '.res';
  175. resobjext : '.or';
  176. sharedlibext : '.so';
  177. staticlibext : '.a';
  178. staticlibprefix : 'libp';
  179. sharedlibprefix : 'lib';
  180. sharedClibext : '.so';
  181. staticClibext : '.a';
  182. staticClibprefix : 'lib';
  183. sharedClibprefix : 'lib';
  184. importlibprefix : 'libimp';
  185. importlibext : '.a';
  186. Cprefix : '';
  187. newline : #10;
  188. dirsep : '/';
  189. assem : as_gas;
  190. assemextern : as_gas;
  191. link : ld_none;
  192. linkextern : ld_linux;
  193. ar : ar_gnu_ar;
  194. res : res_elf;
  195. dbg : dbg_stabs;
  196. script : script_unix;
  197. endian : endian_big;
  198. alignment :
  199. (
  200. procalign : 4;
  201. loopalign : 4;
  202. jumpalign : 0;
  203. constalignmin : 0;
  204. constalignmax : 4;
  205. varalignmin : 0;
  206. varalignmax : 4;
  207. localalignmin : 4;
  208. localalignmax : 4;
  209. recordalignmin : 0;
  210. recordalignmax : 2;
  211. maxCrecordalign : 4
  212. );
  213. first_parm_offset : 8;
  214. stacksize : 32*1024*1024;
  215. stackalign : 4;
  216. abi : abi_default
  217. );
  218. system_powerpc_linux_info : tsysteminfo =
  219. (
  220. system : system_powerpc_LINUX;
  221. name : 'Linux for PowerPC';
  222. shortname : 'Linux';
  223. flags : [tf_needs_symbol_size,tf_smartlink_sections,
  224. tf_needs_symbol_type,tf_files_case_sensitive,
  225. tf_smartlink_library,tf_has_winlike_resources];
  226. cpu : cpu_powerpc;
  227. unit_env : '';
  228. extradefines : 'UNIX;HASUNIX';
  229. exeext : '';
  230. defext : '.def';
  231. scriptext : '.sh';
  232. smartext : '.sl';
  233. unitext : '.ppu';
  234. unitlibext : '.ppl';
  235. asmext : '.s';
  236. objext : '.o';
  237. resext : '.res';
  238. resobjext : '.or';
  239. sharedlibext : '.so';
  240. staticlibext : '.a';
  241. staticlibprefix : 'libp';
  242. sharedlibprefix : 'lib';
  243. sharedClibext : '.so';
  244. staticClibext : '.a';
  245. staticClibprefix : 'lib';
  246. sharedClibprefix : 'lib';
  247. importlibprefix : 'libimp';
  248. importlibext : '.a';
  249. Cprefix : '';
  250. newline : #10;
  251. dirsep : '/';
  252. assem : as_gas;
  253. assemextern : as_gas;
  254. link : ld_none;
  255. linkextern : ld_linux;
  256. ar : ar_gnu_ar;
  257. res : res_elf;
  258. dbg : dbg_stabs;
  259. script : script_unix;
  260. endian : endian_big;
  261. alignment :
  262. (
  263. procalign : 4;
  264. loopalign : 4;
  265. jumpalign : 0;
  266. constalignmin : 0;
  267. constalignmax : 4;
  268. varalignmin : 0;
  269. varalignmax : 4;
  270. localalignmin : 4;
  271. localalignmax : 4;
  272. recordalignmin : 0;
  273. recordalignmax : 4;
  274. maxCrecordalign : 8
  275. );
  276. first_parm_offset : 8;
  277. stacksize : 32*1024*1024;
  278. stackalign : 16;
  279. abi : abi_powerpc_sysv;
  280. );
  281. system_powerpc64_linux_info : tsysteminfo =
  282. (
  283. system : system_powerpc64_LINUX;
  284. name : 'Linux for PowerPC64';
  285. shortname : 'Linux';
  286. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  287. tf_requires_proper_alignment,tf_smartlink_sections,tf_has_winlike_resources];
  288. cpu : cpu_powerpc64;
  289. unit_env : '';
  290. extradefines : 'UNIX;HASUNIX';
  291. exeext : '';
  292. defext : '.def';
  293. scriptext : '.sh';
  294. smartext : '.sl';
  295. unitext : '.ppu';
  296. unitlibext : '.ppl';
  297. asmext : '.s';
  298. objext : '.o';
  299. resext : '.res';
  300. resobjext : '.or';
  301. sharedlibext : '.so';
  302. staticlibext : '.a';
  303. staticlibprefix : 'libp';
  304. sharedlibprefix : 'lib';
  305. sharedClibext : '.so';
  306. staticClibext : '.a';
  307. staticClibprefix : 'lib';
  308. sharedClibprefix : 'lib';
  309. importlibprefix : 'libimp';
  310. importlibext : '.a';
  311. Cprefix : '';
  312. newline : #10;
  313. dirsep : '/';
  314. assem : as_gas;
  315. assemextern : as_gas;
  316. link : ld_none;
  317. linkextern : ld_linux;
  318. ar : ar_gnu_ar;
  319. res : res_elf;
  320. dbg : dbg_dwarf2;
  321. script : script_unix;
  322. endian : endian_big;
  323. alignment :
  324. (
  325. procalign : 8;
  326. loopalign : 4;
  327. jumpalign : 0;
  328. constalignmin : 4;
  329. constalignmax : 16;
  330. varalignmin : 4;
  331. varalignmax : 16;
  332. localalignmin : 0;
  333. localalignmax : 16;
  334. recordalignmin : 0;
  335. recordalignmax : 16;
  336. maxCrecordalign : 16
  337. );
  338. first_parm_offset : 8;
  339. stacksize : 10*1024*1024;
  340. stackalign : 16;
  341. abi : abi_powerpc_sysv
  342. );
  343. system_alpha_linux_info : tsysteminfo =
  344. (
  345. system : system_alpha_LINUX;
  346. name : 'Linux for Alpha';
  347. shortname : 'Linux';
  348. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  349. tf_smartlink_library,tf_has_winlike_resources];
  350. cpu : cpu_alpha;
  351. unit_env : 'LINUXUNITS';
  352. extradefines : 'UNIX;HASUNIX';
  353. exeext : '';
  354. defext : '.def';
  355. scriptext : '.sh';
  356. smartext : '.sl';
  357. unitext : '.ppu';
  358. unitlibext : '.ppl';
  359. asmext : '.s';
  360. objext : '.o';
  361. resext : '.res';
  362. resobjext : '.or';
  363. sharedlibext : '.so';
  364. staticlibext : '.a';
  365. staticlibprefix : 'libp';
  366. sharedlibprefix : 'lib';
  367. sharedClibext : '.so';
  368. staticClibext : '.a';
  369. staticClibprefix : 'lib';
  370. sharedClibprefix : 'lib';
  371. importlibprefix : 'libimp';
  372. importlibext : '.a';
  373. Cprefix : '';
  374. newline : #10;
  375. dirsep : '/';
  376. assem : as_gas;
  377. assemextern : as_gas;
  378. link : ld_none;
  379. linkextern : ld_linux;
  380. ar : ar_gnu_ar;
  381. res : res_elf;
  382. dbg : dbg_stabs;
  383. script : script_unix;
  384. endian : endian_little;
  385. alignment :
  386. (
  387. procalign : 4;
  388. loopalign : 4;
  389. jumpalign : 0;
  390. constalignmin : 0;
  391. constalignmax : 4;
  392. varalignmin : 0;
  393. varalignmax : 4;
  394. localalignmin : 4;
  395. localalignmax : 4;
  396. recordalignmin : 0;
  397. recordalignmax : 2;
  398. maxCrecordalign : 4
  399. );
  400. first_parm_offset : 8;
  401. stacksize : 32*1024*1024;
  402. stackalign : 8; { ??? }
  403. abi : abi_default
  404. );
  405. system_x86_64_linux_info : tsysteminfo =
  406. (
  407. system : system_x86_64_LINUX;
  408. name : 'Linux for x86-64';
  409. shortname : 'Linux';
  410. flags : [tf_smartlink_sections,tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_smartlink_library,
  411. tf_library_needs_pic,tf_needs_symbol_type,tf_files_case_sensitive,
  412. tf_has_winlike_resources,tf_safecall_exceptions,tf_safecall_clearstack];
  413. cpu : cpu_x86_64;
  414. unit_env : 'LINUXUNITS';
  415. extradefines : 'UNIX;HASUNIX';
  416. exeext : '';
  417. defext : '.def';
  418. scriptext : '.sh';
  419. smartext : '.sl';
  420. unitext : '.ppu';
  421. unitlibext : '.ppl';
  422. asmext : '.s';
  423. objext : '.o';
  424. resext : '.res';
  425. resobjext : '.or';
  426. sharedlibext : '.so';
  427. staticlibext : '.a';
  428. staticlibprefix : 'libp';
  429. sharedlibprefix : 'lib';
  430. sharedClibext : '.so';
  431. staticClibext : '.a';
  432. staticClibprefix : 'lib';
  433. sharedClibprefix : 'lib';
  434. importlibprefix : 'libimp';
  435. importlibext : '.a';
  436. Cprefix : '';
  437. newline : #10;
  438. dirsep : '/';
  439. assem : as_x86_64_elf64;
  440. assemextern : as_gas;
  441. link : ld_none;
  442. linkextern : ld_linux;
  443. ar : ar_gnu_ar;
  444. res : res_elf;
  445. dbg : dbg_dwarf2;
  446. script : script_unix;
  447. endian : endian_little;
  448. alignment :
  449. (
  450. procalign : 16;
  451. loopalign : 8;
  452. jumpalign : 0;
  453. constalignmin : 0;
  454. constalignmax : 8;
  455. varalignmin : 0;
  456. varalignmax : 16;
  457. localalignmin : 4;
  458. localalignmax : 16;
  459. recordalignmin : 0;
  460. recordalignmax : 16;
  461. maxCrecordalign : 16
  462. );
  463. first_parm_offset : 16;
  464. stacksize : 8*1024*1024;
  465. stackalign : 16;
  466. abi : abi_default
  467. );
  468. system_sparc_linux_info : tsysteminfo =
  469. (
  470. system : system_SPARC_Linux;
  471. name : 'Linux for SPARC';
  472. shortname : 'Linux';
  473. flags : [tf_needs_symbol_size,tf_library_needs_pic,tf_smartlink_sections,
  474. tf_needs_symbol_type,tf_files_case_sensitive,
  475. tf_smartlink_library,tf_pic_uses_got,
  476. tf_requires_proper_alignment,tf_safecall_exceptions, tf_safecall_clearstack,
  477. tf_has_winlike_resources];
  478. cpu : cpu_SPARC;
  479. unit_env : 'LINUXUNITS';
  480. extradefines : 'UNIX;HASUNIX';
  481. exeext : '';
  482. defext : '.def';
  483. scriptext : '.sh';
  484. smartext : '.sl';
  485. unitext : '.ppu';
  486. unitlibext : '.ppl';
  487. asmext : '.s';
  488. objext : '.o';
  489. resext : '.res';
  490. resobjext : '.or';
  491. sharedlibext : '.so';
  492. staticlibext : '.a';
  493. staticlibprefix : 'libp';
  494. sharedlibprefix : 'lib';
  495. sharedClibext : '.so';
  496. staticClibext : '.a';
  497. staticClibprefix : 'lib';
  498. sharedClibprefix : 'lib';
  499. importlibprefix : 'libimp';
  500. importlibext : '.a';
  501. Cprefix : '';
  502. newline : #10;
  503. dirsep : '/';
  504. assem : as_gas;
  505. assemextern : as_gas;
  506. link : ld_none;
  507. linkextern : ld_linux;
  508. ar : ar_gnu_ar;
  509. res : res_elf;
  510. dbg : dbg_stabs;
  511. script : script_unix;
  512. endian : endian_big;
  513. alignment :
  514. (
  515. procalign : 4;
  516. loopalign : 4;
  517. jumpalign : 0;
  518. constalignmin : 4;
  519. constalignmax : 8;
  520. varalignmin : 4;
  521. varalignmax : 8;
  522. localalignmin : 4;
  523. localalignmax : 8;
  524. recordalignmin : 0;
  525. recordalignmax : 8;
  526. maxCrecordalign : 8
  527. );
  528. first_parm_offset : 92;
  529. stacksize : 8*1024*1024;
  530. stackalign : 8;
  531. abi : abi_default
  532. );
  533. {$ifdef FPC_ARMHF}
  534. system_arm_linux_info : tsysteminfo =
  535. (
  536. system : system_arm_Linux;
  537. name : 'Linux for ARMHF';
  538. shortname : 'Linux';
  539. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  540. tf_requires_proper_alignment,
  541. tf_smartlink_sections,tf_smartlink_library,tf_pic_uses_got,
  542. tf_has_winlike_resources];
  543. cpu : cpu_arm;
  544. unit_env : 'LINUXUNITS';
  545. extradefines : 'UNIX;HASUNIX;CPUARMHF';
  546. exeext : '';
  547. defext : '.def';
  548. scriptext : '.sh';
  549. smartext : '.sl';
  550. unitext : '.ppu';
  551. unitlibext : '.ppl';
  552. asmext : '.s';
  553. objext : '.o';
  554. resext : '.res';
  555. resobjext : '.or';
  556. sharedlibext : '.so';
  557. staticlibext : '.a';
  558. staticlibprefix : 'libp';
  559. sharedlibprefix : 'lib';
  560. sharedClibext : '.so';
  561. staticClibext : '.a';
  562. staticClibprefix : 'lib';
  563. sharedClibprefix : 'lib';
  564. importlibprefix : 'libimp';
  565. importlibext : '.a';
  566. Cprefix : '';
  567. newline : #10;
  568. dirsep : '/';
  569. assem : as_gas;
  570. assemextern : as_gas;
  571. link : ld_none;
  572. linkextern : ld_linux;
  573. ar : ar_gnu_ar;
  574. res : res_elf;
  575. dbg : dbg_stabs;
  576. script : script_unix;
  577. endian : endian_little;
  578. alignment :
  579. (
  580. procalign : 4;
  581. loopalign : 4;
  582. jumpalign : 0;
  583. constalignmin : 0;
  584. constalignmax : 8;
  585. varalignmin : 0;
  586. varalignmax : 8;
  587. localalignmin : 4;
  588. localalignmax : 8;
  589. recordalignmin : 0;
  590. recordalignmax : 8;
  591. maxCrecordalign : 8
  592. );
  593. first_parm_offset : 8;
  594. stacksize : 8*1024*1024;
  595. stackalign : 8;
  596. abi : abi_eabihf
  597. );
  598. {$else FPC_ARMHF}
  599. {$ifdef FPC_ARMEL}
  600. system_arm_linux_info : tsysteminfo =
  601. (
  602. system : system_arm_Linux;
  603. name : 'Linux for ARMEL';
  604. shortname : 'Linux';
  605. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  606. tf_requires_proper_alignment,
  607. tf_smartlink_sections,tf_smartlink_library,tf_pic_uses_got,
  608. tf_has_winlike_resources];
  609. cpu : cpu_arm;
  610. unit_env : 'LINUXUNITS';
  611. extradefines : 'UNIX;HASUNIX;CPUARMEL';
  612. exeext : '';
  613. defext : '.def';
  614. scriptext : '.sh';
  615. smartext : '.sl';
  616. unitext : '.ppu';
  617. unitlibext : '.ppl';
  618. asmext : '.s';
  619. objext : '.o';
  620. resext : '.res';
  621. resobjext : '.or';
  622. sharedlibext : '.so';
  623. staticlibext : '.a';
  624. staticlibprefix : 'libp';
  625. sharedlibprefix : 'lib';
  626. sharedClibext : '.so';
  627. staticClibext : '.a';
  628. staticClibprefix : 'lib';
  629. sharedClibprefix : 'lib';
  630. importlibprefix : 'libimp';
  631. importlibext : '.a';
  632. Cprefix : '';
  633. newline : #10;
  634. dirsep : '/';
  635. assem : as_gas;
  636. assemextern : as_gas;
  637. link : ld_none;
  638. linkextern : ld_linux;
  639. ar : ar_gnu_ar;
  640. res : res_elf;
  641. dbg : dbg_stabs;
  642. script : script_unix;
  643. endian : endian_little;
  644. alignment :
  645. (
  646. procalign : 4;
  647. loopalign : 4;
  648. jumpalign : 0;
  649. constalignmin : 0;
  650. constalignmax : 8;
  651. varalignmin : 0;
  652. varalignmax : 8;
  653. localalignmin : 4;
  654. localalignmax : 8;
  655. recordalignmin : 0;
  656. recordalignmax : 8;
  657. maxCrecordalign : 8
  658. );
  659. first_parm_offset : 8;
  660. stacksize : 8*1024*1024;
  661. stackalign : 8;
  662. abi : abi_eabi
  663. );
  664. {$else FPC_ARMEL}
  665. {$ifdef FPC_ARMEB}
  666. system_arm_linux_info : tsysteminfo =
  667. (
  668. system : system_arm_Linux;
  669. name : 'Linux for ARMEB';
  670. shortname : 'Linux';
  671. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  672. tf_requires_proper_alignment,
  673. tf_smartlink_sections,tf_smartlink_library,tf_pic_uses_got,
  674. tf_has_winlike_resources];
  675. cpu : cpu_arm;
  676. unit_env : 'LINUXUNITS';
  677. extradefines : 'UNIX;HASUNIX;CPUARMEB';
  678. exeext : '';
  679. defext : '.def';
  680. scriptext : '.sh';
  681. smartext : '.sl';
  682. unitext : '.ppu';
  683. unitlibext : '.ppl';
  684. asmext : '.s';
  685. objext : '.o';
  686. resext : '.res';
  687. resobjext : '.or';
  688. sharedlibext : '.so';
  689. staticlibext : '.a';
  690. staticlibprefix : 'libp';
  691. sharedlibprefix : 'lib';
  692. sharedClibext : '.so';
  693. staticClibext : '.a';
  694. staticClibprefix : 'lib';
  695. sharedClibprefix : 'lib';
  696. importlibprefix : 'libimp';
  697. importlibext : '.a';
  698. Cprefix : '';
  699. newline : #10;
  700. dirsep : '/';
  701. assem : as_gas;
  702. assemextern : as_gas;
  703. link : ld_none;
  704. linkextern : ld_linux;
  705. ar : ar_gnu_ar;
  706. res : res_elf;
  707. dbg : dbg_stabs;
  708. script : script_unix;
  709. endian : endian_big;
  710. alignment :
  711. (
  712. procalign : 4;
  713. loopalign : 4;
  714. jumpalign : 0;
  715. constalignmin : 0;
  716. constalignmax : 4;
  717. varalignmin : 0;
  718. varalignmax : 4;
  719. localalignmin : 4;
  720. localalignmax : 8;
  721. recordalignmin : 0;
  722. recordalignmax : 4;
  723. maxCrecordalign : 4
  724. );
  725. first_parm_offset : 8;
  726. stacksize : 8*1024*1024;
  727. stackalign : 4;
  728. abi : abi_default
  729. );
  730. {$else FPC_ARMEB}
  731. system_arm_linux_info : tsysteminfo =
  732. (
  733. system : system_arm_Linux;
  734. name : 'Linux for ARM';
  735. shortname : 'Linux';
  736. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  737. tf_requires_proper_alignment,
  738. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  739. cpu : cpu_arm;
  740. unit_env : 'LINUXUNITS';
  741. extradefines : 'UNIX;HASUNIX';
  742. exeext : '';
  743. defext : '.def';
  744. scriptext : '.sh';
  745. smartext : '.sl';
  746. unitext : '.ppu';
  747. unitlibext : '.ppl';
  748. asmext : '.s';
  749. objext : '.o';
  750. resext : '.res';
  751. resobjext : '.or';
  752. sharedlibext : '.so';
  753. staticlibext : '.a';
  754. staticlibprefix : 'libp';
  755. sharedlibprefix : 'lib';
  756. sharedClibext : '.so';
  757. staticClibext : '.a';
  758. staticClibprefix : 'lib';
  759. sharedClibprefix : 'lib';
  760. importlibprefix : 'libimp';
  761. importlibext : '.a';
  762. Cprefix : '';
  763. newline : #10;
  764. dirsep : '/';
  765. assem : as_gas;
  766. assemextern : as_gas;
  767. link : ld_none;
  768. linkextern : ld_linux;
  769. ar : ar_gnu_ar;
  770. res : res_elf;
  771. dbg : dbg_stabs;
  772. script : script_unix;
  773. endian : endian_little;
  774. alignment :
  775. (
  776. procalign : 4;
  777. loopalign : 4;
  778. jumpalign : 0;
  779. constalignmin : 0;
  780. constalignmax : 4;
  781. varalignmin : 0;
  782. varalignmax : 4;
  783. localalignmin : 4;
  784. localalignmax : 4;
  785. recordalignmin : 0;
  786. recordalignmax : 4;
  787. maxCrecordalign : 4
  788. );
  789. first_parm_offset : 8;
  790. stacksize : 8*1024*1024;
  791. stackalign : 4;
  792. abi : abi_default
  793. );
  794. {$endif FPC_ARMEB}
  795. {$endif FPC_ARMEL}
  796. {$endif FPC_ARMHF}
  797. system_mipseb_linux_info : tsysteminfo =
  798. (
  799. system : system_mipseb_LINUX;
  800. name : 'Linux for MIPSEB';
  801. shortname : 'Linux';
  802. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  803. tf_requires_proper_alignment,
  804. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  805. cpu : cpu_mipseb;
  806. unit_env : 'LINUXUNITS';
  807. extradefines : 'UNIX;HASUNIX';
  808. exeext : '';
  809. defext : '.def';
  810. scriptext : '.sh';
  811. smartext : '.sl';
  812. unitext : '.ppu';
  813. unitlibext : '.ppl';
  814. asmext : '.s';
  815. objext : '.o';
  816. resext : '.res';
  817. resobjext : '.or';
  818. sharedlibext : '.so';
  819. staticlibext : '.a';
  820. staticlibprefix : 'libp';
  821. sharedlibprefix : 'lib';
  822. sharedClibext : '.so';
  823. staticClibext : '.a';
  824. staticClibprefix : 'lib';
  825. sharedClibprefix : 'lib';
  826. importlibprefix : 'libimp';
  827. importlibext : '.a';
  828. // p_ext_support : false;
  829. Cprefix : '';
  830. newline : #10;
  831. dirsep : '/';
  832. assem : as_gas;
  833. assemextern : as_gas;
  834. link : ld_none;
  835. linkextern : ld_linux;
  836. ar : ar_gnu_ar;
  837. res : res_elf;
  838. dbg : dbg_stabs;
  839. script : script_unix;
  840. endian : endian_big;
  841. alignment :
  842. (
  843. procalign : 4;
  844. loopalign : 4;
  845. jumpalign : 0;
  846. constalignmin : 0;
  847. constalignmax : 8;
  848. varalignmin : 0;
  849. varalignmax : 8;
  850. localalignmin : 4;
  851. localalignmax : 8;
  852. recordalignmin : 0;
  853. recordalignmax : 8;
  854. maxCrecordalign : 8
  855. );
  856. first_parm_offset : 0;
  857. stacksize : 32*1024*1024;
  858. stackalign : 8;
  859. abi : abi_default
  860. );
  861. system_mipsel_linux_info : tsysteminfo =
  862. (
  863. system : system_mipsel_LINUX;
  864. name : 'Linux for MIPSEL';
  865. shortname : 'Linux';
  866. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  867. tf_requires_proper_alignment,
  868. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  869. cpu : cpu_mipsel;
  870. unit_env : 'LINUXUNITS';
  871. extradefines : 'UNIX;HASUNIX';
  872. exeext : '';
  873. defext : '.def';
  874. scriptext : '.sh';
  875. smartext : '.sl';
  876. unitext : '.ppu';
  877. unitlibext : '.ppl';
  878. asmext : '.s';
  879. objext : '.o';
  880. resext : '.res';
  881. resobjext : '.or';
  882. sharedlibext : '.so';
  883. staticlibext : '.a';
  884. staticlibprefix : 'libp';
  885. sharedlibprefix : 'lib';
  886. sharedClibext : '.so';
  887. staticClibext : '.a';
  888. staticClibprefix : 'lib';
  889. sharedClibprefix : 'lib';
  890. importlibprefix : 'libimp';
  891. importlibext : '.a';
  892. // p_ext_support : false;
  893. Cprefix : '';
  894. newline : #10;
  895. dirsep : '/';
  896. assem : as_gas;
  897. assemextern : as_gas;
  898. link : ld_none;
  899. linkextern : ld_linux;
  900. ar : ar_gnu_ar;
  901. res : res_elf;
  902. dbg : dbg_stabs;
  903. script : script_unix;
  904. endian : endian_little;
  905. alignment :
  906. (
  907. procalign : 4;
  908. loopalign : 4;
  909. jumpalign : 0;
  910. constalignmin : 0;
  911. constalignmax : 8;
  912. varalignmin : 0;
  913. varalignmax : 8;
  914. localalignmin : 4;
  915. localalignmax : 8;
  916. recordalignmin : 0;
  917. recordalignmax : 8;
  918. maxCrecordalign : 8
  919. );
  920. first_parm_offset : 0;
  921. stacksize : 32*1024*1024;
  922. stackalign : 8;
  923. abi : abi_default
  924. );
  925. implementation
  926. initialization
  927. {$ifdef CPUI386}
  928. {$ifdef linux}
  929. { some FreeBSD versions define linux as well }
  930. {$ifndef FreeBSD}
  931. set_source_info(system_i386_linux_info);
  932. {$endif FreeBSD}
  933. {$endif}
  934. {$endif CPUI386}
  935. {$ifdef CPU68}
  936. {$ifdef linux}
  937. set_source_info(system_m68k_linux_info);
  938. {$endif linux}
  939. {$endif CPU68}
  940. {$ifdef CPUX86_64}
  941. {$ifdef linux}
  942. set_source_info(system_x86_64_linux_info);
  943. {$endif linux}
  944. {$endif CPUX86_64}
  945. {$ifdef CPUALPHA}
  946. {$ifdef linux}
  947. set_source_info(system_alpha_linux_info);
  948. {$endif linux}
  949. {$endif CPUALPHA}
  950. {$ifdef CPUSPARC}
  951. {$ifdef linux}
  952. set_source_info(system_sparc_linux_info);
  953. {$endif linux}
  954. {$endif CPUSPARC}
  955. {$ifdef CPUPOWERPC32}
  956. {$ifdef linux}
  957. set_source_info(system_powerpc_linux_info);
  958. {$endif linux}
  959. {$endif CPUPOWERPC32}
  960. {$ifdef CPUPOWERPC64}
  961. {$ifdef linux}
  962. set_source_info(system_powerpc64_linux_info);
  963. {$endif linux}
  964. {$endif CPUPOWERPC64}
  965. {$ifdef CPUARM}
  966. {$ifdef linux}
  967. set_source_info(system_arm_linux_info);
  968. {$endif linux}
  969. {$endif CPUARM}
  970. {$ifdef CPUMIPSEB}
  971. {$ifdef linux}
  972. set_source_info(system_mipseb_linux_info);
  973. {$endif linux}
  974. {$endif CPUMIPSEB}
  975. {$ifdef CPUMIPSEL}
  976. {$ifdef linux}
  977. set_source_info(system_mipsel_linux_info);
  978. {$endif linux}
  979. {$endif CPUMIPSEL}
  980. end.