i_linux.pas 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002
  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,tf_library_needs_pic,
  804. tf_pic_uses_got,tf_safecall_exceptions,
  805. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  806. cpu : cpu_mipseb;
  807. unit_env : 'LINUXUNITS';
  808. extradefines : 'UNIX;HASUNIX';
  809. exeext : '';
  810. defext : '.def';
  811. scriptext : '.sh';
  812. smartext : '.sl';
  813. unitext : '.ppu';
  814. unitlibext : '.ppl';
  815. asmext : '.s';
  816. objext : '.o';
  817. resext : '.res';
  818. resobjext : '.or';
  819. sharedlibext : '.so';
  820. staticlibext : '.a';
  821. staticlibprefix : 'libp';
  822. sharedlibprefix : 'lib';
  823. sharedClibext : '.so';
  824. staticClibext : '.a';
  825. staticClibprefix : 'lib';
  826. sharedClibprefix : 'lib';
  827. importlibprefix : 'libimp';
  828. importlibext : '.a';
  829. // p_ext_support : false;
  830. Cprefix : '';
  831. newline : #10;
  832. dirsep : '/';
  833. assem : as_gas;
  834. assemextern : as_gas;
  835. link : ld_none;
  836. linkextern : ld_linux;
  837. ar : ar_gnu_ar;
  838. res : res_elf;
  839. dbg : dbg_stabs;
  840. script : script_unix;
  841. endian : endian_big;
  842. alignment :
  843. (
  844. procalign : 4;
  845. loopalign : 4;
  846. jumpalign : 0;
  847. constalignmin : 0;
  848. constalignmax : 8;
  849. varalignmin : 0;
  850. varalignmax : 8;
  851. localalignmin : 4;
  852. localalignmax : 8;
  853. recordalignmin : 0;
  854. recordalignmax : 8;
  855. maxCrecordalign : 8
  856. );
  857. first_parm_offset : 0;
  858. stacksize : 32*1024*1024;
  859. stackalign : 8;
  860. abi : abi_default
  861. );
  862. system_mipsel_linux_info : tsysteminfo =
  863. (
  864. system : system_mipsel_LINUX;
  865. name : 'Linux for MIPSEL';
  866. shortname : 'Linux';
  867. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  868. tf_requires_proper_alignment,tf_library_needs_pic,
  869. tf_pic_uses_got,tf_safecall_exceptions,
  870. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  871. cpu : cpu_mipsel;
  872. unit_env : 'LINUXUNITS';
  873. extradefines : 'UNIX;HASUNIX';
  874. exeext : '';
  875. defext : '.def';
  876. scriptext : '.sh';
  877. smartext : '.sl';
  878. unitext : '.ppu';
  879. unitlibext : '.ppl';
  880. asmext : '.s';
  881. objext : '.o';
  882. resext : '.res';
  883. resobjext : '.or';
  884. sharedlibext : '.so';
  885. staticlibext : '.a';
  886. staticlibprefix : 'libp';
  887. sharedlibprefix : 'lib';
  888. sharedClibext : '.so';
  889. staticClibext : '.a';
  890. staticClibprefix : 'lib';
  891. sharedClibprefix : 'lib';
  892. importlibprefix : 'libimp';
  893. importlibext : '.a';
  894. // p_ext_support : false;
  895. Cprefix : '';
  896. newline : #10;
  897. dirsep : '/';
  898. assem : as_gas;
  899. assemextern : as_gas;
  900. link : ld_none;
  901. linkextern : ld_linux;
  902. ar : ar_gnu_ar;
  903. res : res_elf;
  904. dbg : dbg_stabs;
  905. script : script_unix;
  906. endian : endian_little;
  907. alignment :
  908. (
  909. procalign : 4;
  910. loopalign : 4;
  911. jumpalign : 0;
  912. constalignmin : 0;
  913. constalignmax : 8;
  914. varalignmin : 0;
  915. varalignmax : 8;
  916. localalignmin : 4;
  917. localalignmax : 8;
  918. recordalignmin : 0;
  919. recordalignmax : 8;
  920. maxCrecordalign : 8
  921. );
  922. first_parm_offset : 0;
  923. stacksize : 32*1024*1024;
  924. stackalign : 8;
  925. abi : abi_default
  926. );
  927. implementation
  928. initialization
  929. {$ifdef CPUI386}
  930. {$ifdef linux}
  931. { some FreeBSD versions define linux as well }
  932. {$ifndef FreeBSD}
  933. set_source_info(system_i386_linux_info);
  934. {$endif FreeBSD}
  935. {$endif}
  936. {$endif CPUI386}
  937. {$ifdef CPU68}
  938. {$ifdef linux}
  939. set_source_info(system_m68k_linux_info);
  940. {$endif linux}
  941. {$endif CPU68}
  942. {$ifdef CPUX86_64}
  943. {$ifdef linux}
  944. set_source_info(system_x86_64_linux_info);
  945. {$endif linux}
  946. {$endif CPUX86_64}
  947. {$ifdef CPUALPHA}
  948. {$ifdef linux}
  949. set_source_info(system_alpha_linux_info);
  950. {$endif linux}
  951. {$endif CPUALPHA}
  952. {$ifdef CPUSPARC}
  953. {$ifdef linux}
  954. set_source_info(system_sparc_linux_info);
  955. {$endif linux}
  956. {$endif CPUSPARC}
  957. {$ifdef CPUPOWERPC32}
  958. {$ifdef linux}
  959. set_source_info(system_powerpc_linux_info);
  960. {$endif linux}
  961. {$endif CPUPOWERPC32}
  962. {$ifdef CPUPOWERPC64}
  963. {$ifdef linux}
  964. set_source_info(system_powerpc64_linux_info);
  965. {$endif linux}
  966. {$endif CPUPOWERPC64}
  967. {$ifdef CPUARM}
  968. {$ifdef linux}
  969. set_source_info(system_arm_linux_info);
  970. {$endif linux}
  971. {$endif CPUARM}
  972. {$ifdef CPUMIPSEB}
  973. {$ifdef linux}
  974. set_source_info(system_mipseb_linux_info);
  975. {$endif linux}
  976. {$endif CPUMIPSEB}
  977. {$ifdef CPUMIPSEL}
  978. {$ifdef linux}
  979. set_source_info(system_mipsel_linux_info);
  980. {$endif linux}
  981. {$endif CPUMIPSEL}
  982. end.