i_linux.pas 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060
  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_requires_proper_alignment, { Coldfire seems to need this at least (KB) }
  161. tf_smartlink_library,tf_has_winlike_resources];
  162. cpu : cpu_m68k;
  163. unit_env : 'LINUXUNITS';
  164. extradefines : 'UNIX;HASUNIX';
  165. exeext : '';
  166. defext : '';
  167. scriptext : '.sh';
  168. smartext : '.sl';
  169. unitext : '.ppu';
  170. unitlibext : '.ppl';
  171. asmext : '.s';
  172. objext : '.o';
  173. resext : '.res';
  174. resobjext : '.or';
  175. sharedlibext : '.so';
  176. staticlibext : '.a';
  177. staticlibprefix : 'libp';
  178. sharedlibprefix : 'lib';
  179. sharedClibext : '.so';
  180. staticClibext : '.a';
  181. staticClibprefix : 'lib';
  182. sharedClibprefix : 'lib';
  183. importlibprefix : 'libimp';
  184. importlibext : '.a';
  185. Cprefix : '';
  186. newline : #10;
  187. dirsep : '/';
  188. assem : as_gas;
  189. assemextern : as_gas;
  190. link : nil;
  191. linkextern : nil;
  192. ar : ar_gnu_ar;
  193. res : res_elf;
  194. dbg : dbg_stabs;
  195. script : script_unix;
  196. endian : endian_big;
  197. alignment :
  198. (
  199. procalign : 4;
  200. loopalign : 4;
  201. jumpalign : 0;
  202. constalignmin : 0;
  203. constalignmax : 4;
  204. varalignmin : 0;
  205. varalignmax : 4;
  206. localalignmin : 4;
  207. localalignmax : 4;
  208. recordalignmin : 0;
  209. recordalignmax : 2;
  210. maxCrecordalign : 4
  211. );
  212. first_parm_offset : 8;
  213. stacksize : 32*1024*1024;
  214. stackalign : 4;
  215. abi : abi_default
  216. );
  217. system_powerpc_linux_info : tsysteminfo =
  218. (
  219. system : system_powerpc_LINUX;
  220. name : 'Linux for PowerPC';
  221. shortname : 'Linux';
  222. flags : [tf_needs_symbol_size,tf_smartlink_sections,
  223. tf_needs_symbol_type,tf_files_case_sensitive,
  224. tf_smartlink_library,tf_has_winlike_resources];
  225. cpu : cpu_powerpc;
  226. unit_env : '';
  227. extradefines : 'UNIX;HASUNIX';
  228. exeext : '';
  229. defext : '.def';
  230. scriptext : '.sh';
  231. smartext : '.sl';
  232. unitext : '.ppu';
  233. unitlibext : '.ppl';
  234. asmext : '.s';
  235. objext : '.o';
  236. resext : '.res';
  237. resobjext : '.or';
  238. sharedlibext : '.so';
  239. staticlibext : '.a';
  240. staticlibprefix : 'libp';
  241. sharedlibprefix : 'lib';
  242. sharedClibext : '.so';
  243. staticClibext : '.a';
  244. staticClibprefix : 'lib';
  245. sharedClibprefix : 'lib';
  246. importlibprefix : 'libimp';
  247. importlibext : '.a';
  248. Cprefix : '';
  249. newline : #10;
  250. dirsep : '/';
  251. assem : as_gas;
  252. assemextern : as_gas;
  253. link : nil;
  254. linkextern : nil;
  255. ar : ar_gnu_ar;
  256. res : res_elf;
  257. dbg : dbg_stabs;
  258. script : script_unix;
  259. endian : endian_big;
  260. alignment :
  261. (
  262. procalign : 4;
  263. loopalign : 4;
  264. jumpalign : 0;
  265. constalignmin : 0;
  266. constalignmax : 4;
  267. varalignmin : 0;
  268. varalignmax : 4;
  269. localalignmin : 4;
  270. localalignmax : 4;
  271. recordalignmin : 0;
  272. recordalignmax : 4;
  273. maxCrecordalign : 8
  274. );
  275. first_parm_offset : 8;
  276. stacksize : 32*1024*1024;
  277. stackalign : 16;
  278. abi : abi_powerpc_sysv;
  279. );
  280. system_powerpc64_linux_info : tsysteminfo =
  281. (
  282. system : system_powerpc64_LINUX;
  283. name : 'Linux for PowerPC64';
  284. shortname : 'Linux';
  285. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  286. tf_requires_proper_alignment,tf_smartlink_sections,tf_has_winlike_resources];
  287. cpu : cpu_powerpc64;
  288. unit_env : '';
  289. extradefines : 'UNIX;HASUNIX';
  290. exeext : '';
  291. defext : '.def';
  292. scriptext : '.sh';
  293. smartext : '.sl';
  294. unitext : '.ppu';
  295. unitlibext : '.ppl';
  296. asmext : '.s';
  297. objext : '.o';
  298. resext : '.res';
  299. resobjext : '.or';
  300. sharedlibext : '.so';
  301. staticlibext : '.a';
  302. staticlibprefix : 'libp';
  303. sharedlibprefix : 'lib';
  304. sharedClibext : '.so';
  305. staticClibext : '.a';
  306. staticClibprefix : 'lib';
  307. sharedClibprefix : 'lib';
  308. importlibprefix : 'libimp';
  309. importlibext : '.a';
  310. Cprefix : '';
  311. newline : #10;
  312. dirsep : '/';
  313. assem : as_gas;
  314. assemextern : as_gas;
  315. link : nil;
  316. linkextern : nil;
  317. ar : ar_gnu_ar;
  318. res : res_elf;
  319. dbg : dbg_dwarf2;
  320. script : script_unix;
  321. endian : endian_big;
  322. alignment :
  323. (
  324. procalign : 8;
  325. loopalign : 4;
  326. jumpalign : 0;
  327. constalignmin : 4;
  328. constalignmax : 16;
  329. varalignmin : 4;
  330. varalignmax : 16;
  331. localalignmin : 0;
  332. localalignmax : 16;
  333. recordalignmin : 0;
  334. recordalignmax : 16;
  335. maxCrecordalign : 16
  336. );
  337. first_parm_offset : 8;
  338. stacksize : 10*1024*1024;
  339. stackalign : 16;
  340. abi : abi_powerpc_sysv
  341. );
  342. system_alpha_linux_info : tsysteminfo =
  343. (
  344. system : system_alpha_LINUX;
  345. name : 'Linux for Alpha';
  346. shortname : 'Linux';
  347. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  348. tf_smartlink_library,tf_has_winlike_resources];
  349. cpu : cpu_alpha;
  350. unit_env : 'LINUXUNITS';
  351. extradefines : 'UNIX;HASUNIX';
  352. exeext : '';
  353. defext : '.def';
  354. scriptext : '.sh';
  355. smartext : '.sl';
  356. unitext : '.ppu';
  357. unitlibext : '.ppl';
  358. asmext : '.s';
  359. objext : '.o';
  360. resext : '.res';
  361. resobjext : '.or';
  362. sharedlibext : '.so';
  363. staticlibext : '.a';
  364. staticlibprefix : 'libp';
  365. sharedlibprefix : 'lib';
  366. sharedClibext : '.so';
  367. staticClibext : '.a';
  368. staticClibprefix : 'lib';
  369. sharedClibprefix : 'lib';
  370. importlibprefix : 'libimp';
  371. importlibext : '.a';
  372. Cprefix : '';
  373. newline : #10;
  374. dirsep : '/';
  375. assem : as_gas;
  376. assemextern : as_gas;
  377. link : nil;
  378. linkextern : nil;
  379. ar : ar_gnu_ar;
  380. res : res_elf;
  381. dbg : dbg_stabs;
  382. script : script_unix;
  383. endian : endian_little;
  384. alignment :
  385. (
  386. procalign : 4;
  387. loopalign : 4;
  388. jumpalign : 0;
  389. constalignmin : 0;
  390. constalignmax : 4;
  391. varalignmin : 0;
  392. varalignmax : 4;
  393. localalignmin : 4;
  394. localalignmax : 4;
  395. recordalignmin : 0;
  396. recordalignmax : 2;
  397. maxCrecordalign : 4
  398. );
  399. first_parm_offset : 8;
  400. stacksize : 32*1024*1024;
  401. stackalign : 8; { ??? }
  402. abi : abi_default
  403. );
  404. system_x86_64_linux_info : tsysteminfo =
  405. (
  406. system : system_x86_64_LINUX;
  407. name : 'Linux for x86-64';
  408. shortname : 'Linux';
  409. flags : [tf_smartlink_sections,tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_smartlink_library,
  410. tf_library_needs_pic,tf_needs_symbol_type,tf_files_case_sensitive,
  411. tf_has_winlike_resources,tf_safecall_exceptions,tf_safecall_clearstack];
  412. cpu : cpu_x86_64;
  413. unit_env : 'LINUXUNITS';
  414. extradefines : 'UNIX;HASUNIX';
  415. exeext : '';
  416. defext : '.def';
  417. scriptext : '.sh';
  418. smartext : '.sl';
  419. unitext : '.ppu';
  420. unitlibext : '.ppl';
  421. asmext : '.s';
  422. objext : '.o';
  423. resext : '.res';
  424. resobjext : '.or';
  425. sharedlibext : '.so';
  426. staticlibext : '.a';
  427. staticlibprefix : 'libp';
  428. sharedlibprefix : 'lib';
  429. sharedClibext : '.so';
  430. staticClibext : '.a';
  431. staticClibprefix : 'lib';
  432. sharedClibprefix : 'lib';
  433. importlibprefix : 'libimp';
  434. importlibext : '.a';
  435. Cprefix : '';
  436. newline : #10;
  437. dirsep : '/';
  438. assem : as_x86_64_elf64;
  439. assemextern : as_gas;
  440. link : nil;
  441. linkextern : nil;
  442. ar : ar_gnu_ar;
  443. res : res_elf;
  444. dbg : dbg_dwarf2;
  445. script : script_unix;
  446. endian : endian_little;
  447. alignment :
  448. (
  449. procalign : 16;
  450. loopalign : 8;
  451. jumpalign : 0;
  452. constalignmin : 0;
  453. constalignmax : 8;
  454. varalignmin : 0;
  455. varalignmax : 16;
  456. localalignmin : 4;
  457. localalignmax : 16;
  458. recordalignmin : 0;
  459. recordalignmax : 16;
  460. maxCrecordalign : 16
  461. );
  462. first_parm_offset : 16;
  463. stacksize : 8*1024*1024;
  464. stackalign : 16;
  465. abi : abi_default
  466. );
  467. system_x32_linux_info : tsysteminfo =
  468. (
  469. system : system_x32_linux;
  470. name : 'Linux for x32';
  471. shortname : 'Linux';
  472. flags : [tf_smartlink_sections,tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_smartlink_library,
  473. tf_library_needs_pic,tf_needs_symbol_type,tf_files_case_sensitive,
  474. tf_has_winlike_resources,tf_safecall_exceptions,tf_safecall_clearstack];
  475. cpu : cpu_x32;
  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_x32_elf64;
  502. assemextern : as_gas;
  503. link : nil;
  504. linkextern : nil;
  505. ar : ar_gnu_ar;
  506. res : res_elf;
  507. dbg : dbg_dwarf2;
  508. script : script_unix;
  509. endian : endian_little;
  510. alignment :
  511. (
  512. procalign : 16;
  513. loopalign : 8;
  514. jumpalign : 0;
  515. constalignmin : 0;
  516. constalignmax : 8;
  517. varalignmin : 0;
  518. varalignmax : 16;
  519. localalignmin : 4;
  520. localalignmax : 16;
  521. recordalignmin : 0;
  522. recordalignmax : 16;
  523. maxCrecordalign : 16
  524. );
  525. first_parm_offset : 16;
  526. stacksize : 8*1024*1024;
  527. stackalign : 16;
  528. abi : abi_default
  529. );
  530. system_sparc_linux_info : tsysteminfo =
  531. (
  532. system : system_SPARC_Linux;
  533. name : 'Linux for SPARC';
  534. shortname : 'Linux';
  535. flags : [tf_needs_symbol_size,tf_library_needs_pic,tf_smartlink_sections,
  536. tf_needs_symbol_type,tf_files_case_sensitive,
  537. tf_smartlink_library,tf_pic_uses_got,
  538. tf_requires_proper_alignment,tf_safecall_exceptions, tf_safecall_clearstack,
  539. tf_has_winlike_resources];
  540. cpu : cpu_SPARC;
  541. unit_env : 'LINUXUNITS';
  542. extradefines : 'UNIX;HASUNIX';
  543. exeext : '';
  544. defext : '.def';
  545. scriptext : '.sh';
  546. smartext : '.sl';
  547. unitext : '.ppu';
  548. unitlibext : '.ppl';
  549. asmext : '.s';
  550. objext : '.o';
  551. resext : '.res';
  552. resobjext : '.or';
  553. sharedlibext : '.so';
  554. staticlibext : '.a';
  555. staticlibprefix : 'libp';
  556. sharedlibprefix : 'lib';
  557. sharedClibext : '.so';
  558. staticClibext : '.a';
  559. staticClibprefix : 'lib';
  560. sharedClibprefix : 'lib';
  561. importlibprefix : 'libimp';
  562. importlibext : '.a';
  563. Cprefix : '';
  564. newline : #10;
  565. dirsep : '/';
  566. assem : as_gas;
  567. assemextern : as_gas;
  568. link : nil;
  569. linkextern : nil;
  570. ar : ar_gnu_ar;
  571. res : res_elf;
  572. dbg : dbg_stabs;
  573. script : script_unix;
  574. endian : endian_big;
  575. alignment :
  576. (
  577. procalign : 4;
  578. loopalign : 4;
  579. jumpalign : 0;
  580. constalignmin : 4;
  581. constalignmax : 8;
  582. varalignmin : 4;
  583. varalignmax : 8;
  584. localalignmin : 4;
  585. localalignmax : 8;
  586. recordalignmin : 0;
  587. recordalignmax : 8;
  588. maxCrecordalign : 8
  589. );
  590. first_parm_offset : 92;
  591. stacksize : 8*1024*1024;
  592. stackalign : 8;
  593. abi : abi_default
  594. );
  595. {$ifdef FPC_ARMHF}
  596. system_arm_linux_info : tsysteminfo =
  597. (
  598. system : system_arm_Linux;
  599. name : 'Linux for ARMHF';
  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;CPUARMHF';
  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_eabihf
  658. );
  659. {$else FPC_ARMHF}
  660. {$ifdef FPC_ARMEL}
  661. system_arm_linux_info : tsysteminfo =
  662. (
  663. system : system_arm_Linux;
  664. name : 'Linux for ARMEL';
  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;CPUARMEL';
  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_little;
  704. alignment :
  705. (
  706. procalign : 4;
  707. loopalign : 4;
  708. jumpalign : 0;
  709. constalignmin : 0;
  710. constalignmax : 8;
  711. varalignmin : 0;
  712. varalignmax : 8;
  713. localalignmin : 4;
  714. localalignmax : 8;
  715. recordalignmin : 0;
  716. recordalignmax : 8;
  717. maxCrecordalign : 8
  718. );
  719. first_parm_offset : 8;
  720. stacksize : 8*1024*1024;
  721. stackalign : 8;
  722. abi : abi_eabi
  723. );
  724. {$else FPC_ARMEL}
  725. {$ifdef FPC_ARMEB}
  726. system_arm_linux_info : tsysteminfo =
  727. (
  728. system : system_arm_Linux;
  729. name : 'Linux for ARMEB';
  730. shortname : 'Linux';
  731. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  732. tf_requires_proper_alignment,
  733. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  734. cpu : cpu_arm;
  735. unit_env : 'LINUXUNITS';
  736. extradefines : 'UNIX;HASUNIX;CPUARMEB';
  737. exeext : '';
  738. defext : '.def';
  739. scriptext : '.sh';
  740. smartext : '.sl';
  741. unitext : '.ppu';
  742. unitlibext : '.ppl';
  743. asmext : '.s';
  744. objext : '.o';
  745. resext : '.res';
  746. resobjext : '.or';
  747. sharedlibext : '.so';
  748. staticlibext : '.a';
  749. staticlibprefix : 'libp';
  750. sharedlibprefix : 'lib';
  751. sharedClibext : '.so';
  752. staticClibext : '.a';
  753. staticClibprefix : 'lib';
  754. sharedClibprefix : 'lib';
  755. importlibprefix : 'libimp';
  756. importlibext : '.a';
  757. Cprefix : '';
  758. newline : #10;
  759. dirsep : '/';
  760. assem : as_gas;
  761. assemextern : as_gas;
  762. link : nil;
  763. linkextern : nil;
  764. ar : ar_gnu_ar;
  765. res : res_elf;
  766. dbg : dbg_stabs;
  767. script : script_unix;
  768. endian : endian_big;
  769. alignment :
  770. (
  771. procalign : 4;
  772. loopalign : 4;
  773. jumpalign : 0;
  774. constalignmin : 0;
  775. constalignmax : 4;
  776. varalignmin : 0;
  777. varalignmax : 4;
  778. localalignmin : 4;
  779. localalignmax : 8;
  780. recordalignmin : 0;
  781. recordalignmax : 4;
  782. maxCrecordalign : 4
  783. );
  784. first_parm_offset : 8;
  785. stacksize : 8*1024*1024;
  786. stackalign : 4;
  787. abi : abi_default
  788. );
  789. {$else FPC_ARMEB}
  790. system_arm_linux_info : tsysteminfo =
  791. (
  792. system : system_arm_Linux;
  793. name : 'Linux for ARM';
  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_arm;
  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. Cprefix : '';
  822. newline : #10;
  823. dirsep : '/';
  824. assem : as_gas;
  825. assemextern : as_gas;
  826. link : nil;
  827. linkextern : nil;
  828. ar : ar_gnu_ar;
  829. res : res_elf;
  830. dbg : dbg_stabs;
  831. script : script_unix;
  832. endian : endian_little;
  833. alignment :
  834. (
  835. procalign : 4;
  836. loopalign : 4;
  837. jumpalign : 0;
  838. constalignmin : 0;
  839. constalignmax : 4;
  840. varalignmin : 0;
  841. varalignmax : 4;
  842. localalignmin : 4;
  843. localalignmax : 4;
  844. recordalignmin : 0;
  845. recordalignmax : 4;
  846. maxCrecordalign : 4
  847. );
  848. first_parm_offset : 8;
  849. stacksize : 8*1024*1024;
  850. stackalign : 4;
  851. abi : abi_default
  852. );
  853. {$endif FPC_ARMEB}
  854. {$endif FPC_ARMEL}
  855. {$endif FPC_ARMHF}
  856. system_mipseb_linux_info : tsysteminfo =
  857. (
  858. system : system_mipseb_LINUX;
  859. name : 'Linux for MIPSEB';
  860. shortname : 'Linux';
  861. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  862. tf_requires_proper_alignment,
  863. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  864. cpu : cpu_mipseb;
  865. unit_env : 'LINUXUNITS';
  866. extradefines : 'UNIX;HASUNIX';
  867. exeext : '';
  868. defext : '.def';
  869. scriptext : '.sh';
  870. smartext : '.sl';
  871. unitext : '.ppu';
  872. unitlibext : '.ppl';
  873. asmext : '.s';
  874. objext : '.o';
  875. resext : '.res';
  876. resobjext : '.or';
  877. sharedlibext : '.so';
  878. staticlibext : '.a';
  879. staticlibprefix : 'libp';
  880. sharedlibprefix : 'lib';
  881. sharedClibext : '.so';
  882. staticClibext : '.a';
  883. staticClibprefix : 'lib';
  884. sharedClibprefix : 'lib';
  885. importlibprefix : 'libimp';
  886. importlibext : '.a';
  887. // p_ext_support : false;
  888. Cprefix : '';
  889. newline : #10;
  890. dirsep : '/';
  891. assem : as_gas;
  892. assemextern : as_gas;
  893. link : nil;
  894. linkextern : nil;
  895. ar : ar_gnu_ar;
  896. res : res_elf;
  897. dbg : dbg_stabs;
  898. script : script_unix;
  899. endian : endian_big;
  900. alignment :
  901. (
  902. procalign : 4;
  903. loopalign : 4;
  904. jumpalign : 0;
  905. constalignmin : 0;
  906. constalignmax : 8;
  907. varalignmin : 0;
  908. varalignmax : 8;
  909. localalignmin : 4;
  910. localalignmax : 8;
  911. recordalignmin : 0;
  912. recordalignmax : 8;
  913. maxCrecordalign : 8
  914. );
  915. first_parm_offset : 0;
  916. stacksize : 32*1024*1024;
  917. stackalign : 8;
  918. abi : abi_default
  919. );
  920. system_mipsel_linux_info : tsysteminfo =
  921. (
  922. system : system_mipsel_LINUX;
  923. name : 'Linux for MIPSEL';
  924. shortname : 'Linux';
  925. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  926. tf_requires_proper_alignment,
  927. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  928. cpu : cpu_mipsel;
  929. unit_env : 'LINUXUNITS';
  930. extradefines : 'UNIX;HASUNIX';
  931. exeext : '';
  932. defext : '.def';
  933. scriptext : '.sh';
  934. smartext : '.sl';
  935. unitext : '.ppu';
  936. unitlibext : '.ppl';
  937. asmext : '.s';
  938. objext : '.o';
  939. resext : '.res';
  940. resobjext : '.or';
  941. sharedlibext : '.so';
  942. staticlibext : '.a';
  943. staticlibprefix : 'libp';
  944. sharedlibprefix : 'lib';
  945. sharedClibext : '.so';
  946. staticClibext : '.a';
  947. staticClibprefix : 'lib';
  948. sharedClibprefix : 'lib';
  949. importlibprefix : 'libimp';
  950. importlibext : '.a';
  951. // p_ext_support : false;
  952. Cprefix : '';
  953. newline : #10;
  954. dirsep : '/';
  955. assem : as_gas;
  956. assemextern : as_gas;
  957. link : nil;
  958. linkextern : nil;
  959. ar : ar_gnu_ar;
  960. res : res_elf;
  961. dbg : dbg_stabs;
  962. script : script_unix;
  963. endian : endian_little;
  964. alignment :
  965. (
  966. procalign : 4;
  967. loopalign : 4;
  968. jumpalign : 0;
  969. constalignmin : 0;
  970. constalignmax : 8;
  971. varalignmin : 0;
  972. varalignmax : 8;
  973. localalignmin : 4;
  974. localalignmax : 8;
  975. recordalignmin : 0;
  976. recordalignmax : 8;
  977. maxCrecordalign : 8
  978. );
  979. first_parm_offset : 0;
  980. stacksize : 32*1024*1024;
  981. stackalign : 8;
  982. abi : abi_default
  983. );
  984. implementation
  985. initialization
  986. {$ifdef CPUI386}
  987. {$ifdef linux}
  988. { some FreeBSD versions define linux as well }
  989. {$ifndef FreeBSD}
  990. set_source_info(system_i386_linux_info);
  991. {$endif FreeBSD}
  992. {$endif}
  993. {$endif CPUI386}
  994. {$ifdef CPU68}
  995. {$ifdef linux}
  996. set_source_info(system_m68k_linux_info);
  997. {$endif linux}
  998. {$endif CPU68}
  999. {$ifdef CPUX86_64}
  1000. {$ifdef linux}
  1001. set_source_info(system_x86_64_linux_info);
  1002. {$endif linux}
  1003. {$endif CPUX86_64}
  1004. {$ifdef CPUALPHA}
  1005. {$ifdef linux}
  1006. set_source_info(system_alpha_linux_info);
  1007. {$endif linux}
  1008. {$endif CPUALPHA}
  1009. {$ifdef CPUSPARC}
  1010. {$ifdef linux}
  1011. set_source_info(system_sparc_linux_info);
  1012. {$endif linux}
  1013. {$endif CPUSPARC}
  1014. {$ifdef CPUPOWERPC32}
  1015. {$ifdef linux}
  1016. set_source_info(system_powerpc_linux_info);
  1017. {$endif linux}
  1018. {$endif CPUPOWERPC32}
  1019. {$ifdef CPUPOWERPC64}
  1020. {$ifdef linux}
  1021. set_source_info(system_powerpc64_linux_info);
  1022. {$endif linux}
  1023. {$endif CPUPOWERPC64}
  1024. {$ifdef CPUARM}
  1025. {$ifdef linux}
  1026. set_source_info(system_arm_linux_info);
  1027. {$endif linux}
  1028. {$endif CPUARM}
  1029. {$ifdef CPUMIPSEB}
  1030. {$ifdef linux}
  1031. set_source_info(system_mipseb_linux_info);
  1032. {$endif linux}
  1033. {$endif CPUMIPSEB}
  1034. {$ifdef CPUMIPSEL}
  1035. {$ifdef linux}
  1036. set_source_info(system_mipsel_linux_info);
  1037. {$endif linux}
  1038. {$endif CPUMIPSEL}
  1039. end.