i_linux.pas 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995
  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_needs_symbol_type,tf_files_case_sensitive,
  223. tf_smartlink_library,tf_has_winlike_resources];
  224. cpu : cpu_powerpc;
  225. unit_env : '';
  226. extradefines : 'UNIX;HASUNIX';
  227. exeext : '';
  228. defext : '.def';
  229. scriptext : '.sh';
  230. smartext : '.sl';
  231. unitext : '.ppu';
  232. unitlibext : '.ppl';
  233. asmext : '.s';
  234. objext : '.o';
  235. resext : '.res';
  236. resobjext : '.or';
  237. sharedlibext : '.so';
  238. staticlibext : '.a';
  239. staticlibprefix : 'libp';
  240. sharedlibprefix : 'lib';
  241. sharedClibext : '.so';
  242. staticClibext : '.a';
  243. staticClibprefix : 'lib';
  244. sharedClibprefix : 'lib';
  245. importlibprefix : 'libimp';
  246. importlibext : '.a';
  247. Cprefix : '';
  248. newline : #10;
  249. dirsep : '/';
  250. assem : as_gas;
  251. assemextern : as_gas;
  252. link : nil;
  253. linkextern : nil;
  254. ar : ar_gnu_ar;
  255. res : res_elf;
  256. dbg : dbg_stabs;
  257. script : script_unix;
  258. endian : endian_big;
  259. alignment :
  260. (
  261. procalign : 4;
  262. loopalign : 4;
  263. jumpalign : 0;
  264. constalignmin : 0;
  265. constalignmax : 4;
  266. varalignmin : 0;
  267. varalignmax : 4;
  268. localalignmin : 4;
  269. localalignmax : 4;
  270. recordalignmin : 0;
  271. recordalignmax : 4;
  272. maxCrecordalign : 8
  273. );
  274. first_parm_offset : 8;
  275. stacksize : 32*1024*1024;
  276. stackalign : 16;
  277. abi : abi_powerpc_sysv;
  278. );
  279. system_powerpc64_linux_info : tsysteminfo =
  280. (
  281. system : system_powerpc64_LINUX;
  282. name : 'Linux for PowerPC64';
  283. shortname : 'Linux';
  284. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  285. tf_requires_proper_alignment,tf_smartlink_sections,tf_has_winlike_resources];
  286. cpu : cpu_powerpc64;
  287. unit_env : '';
  288. extradefines : 'UNIX;HASUNIX';
  289. exeext : '';
  290. defext : '.def';
  291. scriptext : '.sh';
  292. smartext : '.sl';
  293. unitext : '.ppu';
  294. unitlibext : '.ppl';
  295. asmext : '.s';
  296. objext : '.o';
  297. resext : '.res';
  298. resobjext : '.or';
  299. sharedlibext : '.so';
  300. staticlibext : '.a';
  301. staticlibprefix : 'libp';
  302. sharedlibprefix : 'lib';
  303. sharedClibext : '.so';
  304. staticClibext : '.a';
  305. staticClibprefix : 'lib';
  306. sharedClibprefix : 'lib';
  307. importlibprefix : 'libimp';
  308. importlibext : '.a';
  309. Cprefix : '';
  310. newline : #10;
  311. dirsep : '/';
  312. assem : as_gas;
  313. assemextern : as_gas;
  314. link : nil;
  315. linkextern : nil;
  316. ar : ar_gnu_ar;
  317. res : res_elf;
  318. dbg : dbg_dwarf2;
  319. script : script_unix;
  320. endian : endian_big;
  321. alignment :
  322. (
  323. procalign : 8;
  324. loopalign : 4;
  325. jumpalign : 0;
  326. constalignmin : 4;
  327. constalignmax : 16;
  328. varalignmin : 4;
  329. varalignmax : 16;
  330. localalignmin : 0;
  331. localalignmax : 16;
  332. recordalignmin : 0;
  333. recordalignmax : 16;
  334. maxCrecordalign : 16
  335. );
  336. first_parm_offset : 8;
  337. stacksize : 10*1024*1024;
  338. stackalign : 16;
  339. abi : abi_powerpc_sysv
  340. );
  341. system_alpha_linux_info : tsysteminfo =
  342. (
  343. system : system_alpha_LINUX;
  344. name : 'Linux for Alpha';
  345. shortname : 'Linux';
  346. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  347. tf_smartlink_library,tf_has_winlike_resources];
  348. cpu : cpu_alpha;
  349. unit_env : 'LINUXUNITS';
  350. extradefines : 'UNIX;HASUNIX';
  351. exeext : '';
  352. defext : '.def';
  353. scriptext : '.sh';
  354. smartext : '.sl';
  355. unitext : '.ppu';
  356. unitlibext : '.ppl';
  357. asmext : '.s';
  358. objext : '.o';
  359. resext : '.res';
  360. resobjext : '.or';
  361. sharedlibext : '.so';
  362. staticlibext : '.a';
  363. staticlibprefix : 'libp';
  364. sharedlibprefix : 'lib';
  365. sharedClibext : '.so';
  366. staticClibext : '.a';
  367. staticClibprefix : 'lib';
  368. sharedClibprefix : 'lib';
  369. importlibprefix : 'libimp';
  370. importlibext : '.a';
  371. Cprefix : '';
  372. newline : #10;
  373. dirsep : '/';
  374. assem : as_gas;
  375. assemextern : as_gas;
  376. link : nil;
  377. linkextern : nil;
  378. ar : ar_gnu_ar;
  379. res : res_elf;
  380. dbg : dbg_stabs;
  381. script : script_unix;
  382. endian : endian_little;
  383. alignment :
  384. (
  385. procalign : 4;
  386. loopalign : 4;
  387. jumpalign : 0;
  388. constalignmin : 0;
  389. constalignmax : 4;
  390. varalignmin : 0;
  391. varalignmax : 4;
  392. localalignmin : 4;
  393. localalignmax : 4;
  394. recordalignmin : 0;
  395. recordalignmax : 2;
  396. maxCrecordalign : 4
  397. );
  398. first_parm_offset : 8;
  399. stacksize : 32*1024*1024;
  400. stackalign : 8; { ??? }
  401. abi : abi_default
  402. );
  403. system_x86_64_linux_info : tsysteminfo =
  404. (
  405. system : system_x86_64_LINUX;
  406. name : 'Linux for x86-64';
  407. shortname : 'Linux';
  408. flags : [tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_smartlink_library,
  409. tf_library_needs_pic,tf_needs_symbol_type,tf_files_case_sensitive,
  410. tf_has_winlike_resources,tf_safecall_exceptions,tf_safecall_clearstack];
  411. cpu : cpu_x86_64;
  412. unit_env : 'LINUXUNITS';
  413. extradefines : 'UNIX;HASUNIX';
  414. exeext : '';
  415. defext : '.def';
  416. scriptext : '.sh';
  417. smartext : '.sl';
  418. unitext : '.ppu';
  419. unitlibext : '.ppl';
  420. asmext : '.s';
  421. objext : '.o';
  422. resext : '.res';
  423. resobjext : '.or';
  424. sharedlibext : '.so';
  425. staticlibext : '.a';
  426. staticlibprefix : 'libp';
  427. sharedlibprefix : 'lib';
  428. sharedClibext : '.so';
  429. staticClibext : '.a';
  430. staticClibprefix : 'lib';
  431. sharedClibprefix : 'lib';
  432. importlibprefix : 'libimp';
  433. importlibext : '.a';
  434. Cprefix : '';
  435. newline : #10;
  436. dirsep : '/';
  437. assem : as_x86_64_elf64;
  438. assemextern : as_gas;
  439. link : nil;
  440. linkextern : nil;
  441. ar : ar_gnu_ar;
  442. res : res_elf;
  443. dbg : dbg_dwarf2;
  444. script : script_unix;
  445. endian : endian_little;
  446. alignment :
  447. (
  448. procalign : 16;
  449. loopalign : 8;
  450. jumpalign : 0;
  451. constalignmin : 0;
  452. constalignmax : 8;
  453. varalignmin : 0;
  454. varalignmax : 16;
  455. localalignmin : 4;
  456. localalignmax : 16;
  457. recordalignmin : 0;
  458. recordalignmax : 16;
  459. maxCrecordalign : 16
  460. );
  461. first_parm_offset : 16;
  462. stacksize : 8*1024*1024;
  463. stackalign : 16;
  464. abi : abi_default
  465. );
  466. system_sparc_linux_info : tsysteminfo =
  467. (
  468. system : system_SPARC_Linux;
  469. name : 'Linux for SPARC';
  470. shortname : 'Linux';
  471. flags : [tf_needs_symbol_size,tf_library_needs_pic,tf_smartlink_sections,
  472. tf_needs_symbol_type,tf_files_case_sensitive,
  473. tf_smartlink_library,tf_pic_uses_got,
  474. tf_requires_proper_alignment,tf_safecall_exceptions, tf_safecall_clearstack,
  475. tf_has_winlike_resources];
  476. cpu : cpu_SPARC;
  477. unit_env : 'LINUXUNITS';
  478. extradefines : 'UNIX;HASUNIX';
  479. exeext : '';
  480. defext : '.def';
  481. scriptext : '.sh';
  482. smartext : '.sl';
  483. unitext : '.ppu';
  484. unitlibext : '.ppl';
  485. asmext : '.s';
  486. objext : '.o';
  487. resext : '.res';
  488. resobjext : '.or';
  489. sharedlibext : '.so';
  490. staticlibext : '.a';
  491. staticlibprefix : 'libp';
  492. sharedlibprefix : 'lib';
  493. sharedClibext : '.so';
  494. staticClibext : '.a';
  495. staticClibprefix : 'lib';
  496. sharedClibprefix : 'lib';
  497. importlibprefix : 'libimp';
  498. importlibext : '.a';
  499. Cprefix : '';
  500. newline : #10;
  501. dirsep : '/';
  502. assem : as_gas;
  503. assemextern : as_gas;
  504. link : nil;
  505. linkextern : nil;
  506. ar : ar_gnu_ar;
  507. res : res_elf;
  508. dbg : dbg_stabs;
  509. script : script_unix;
  510. endian : endian_big;
  511. alignment :
  512. (
  513. procalign : 4;
  514. loopalign : 4;
  515. jumpalign : 0;
  516. constalignmin : 4;
  517. constalignmax : 8;
  518. varalignmin : 4;
  519. varalignmax : 8;
  520. localalignmin : 4;
  521. localalignmax : 8;
  522. recordalignmin : 0;
  523. recordalignmax : 8;
  524. maxCrecordalign : 8
  525. );
  526. first_parm_offset : 92;
  527. stacksize : 8*1024*1024;
  528. stackalign : 8;
  529. abi : abi_default
  530. );
  531. {$ifdef FPC_ARMHF}
  532. system_arm_linux_info : tsysteminfo =
  533. (
  534. system : system_arm_Linux;
  535. name : 'Linux for ARMHF';
  536. shortname : 'Linux';
  537. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  538. tf_requires_proper_alignment,
  539. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  540. cpu : cpu_arm;
  541. unit_env : 'LINUXUNITS';
  542. extradefines : 'UNIX;HASUNIX;CPUARMHF';
  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_little;
  575. alignment :
  576. (
  577. procalign : 4;
  578. loopalign : 4;
  579. jumpalign : 0;
  580. constalignmin : 0;
  581. constalignmax : 8;
  582. varalignmin : 0;
  583. varalignmax : 8;
  584. localalignmin : 4;
  585. localalignmax : 8;
  586. recordalignmin : 0;
  587. recordalignmax : 8;
  588. maxCrecordalign : 8
  589. );
  590. first_parm_offset : 8;
  591. stacksize : 8*1024*1024;
  592. stackalign : 8;
  593. abi : abi_eabihf
  594. );
  595. {$else FPC_ARMHF}
  596. {$ifdef FPC_ARMEL}
  597. system_arm_linux_info : tsysteminfo =
  598. (
  599. system : system_arm_Linux;
  600. name : 'Linux for ARMEL';
  601. shortname : 'Linux';
  602. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  603. tf_requires_proper_alignment,
  604. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  605. cpu : cpu_arm;
  606. unit_env : 'LINUXUNITS';
  607. extradefines : 'UNIX;HASUNIX;CPUARMEL';
  608. exeext : '';
  609. defext : '.def';
  610. scriptext : '.sh';
  611. smartext : '.sl';
  612. unitext : '.ppu';
  613. unitlibext : '.ppl';
  614. asmext : '.s';
  615. objext : '.o';
  616. resext : '.res';
  617. resobjext : '.or';
  618. sharedlibext : '.so';
  619. staticlibext : '.a';
  620. staticlibprefix : 'libp';
  621. sharedlibprefix : 'lib';
  622. sharedClibext : '.so';
  623. staticClibext : '.a';
  624. staticClibprefix : 'lib';
  625. sharedClibprefix : 'lib';
  626. importlibprefix : 'libimp';
  627. importlibext : '.a';
  628. Cprefix : '';
  629. newline : #10;
  630. dirsep : '/';
  631. assem : as_gas;
  632. assemextern : as_gas;
  633. link : nil;
  634. linkextern : nil;
  635. ar : ar_gnu_ar;
  636. res : res_elf;
  637. dbg : dbg_stabs;
  638. script : script_unix;
  639. endian : endian_little;
  640. alignment :
  641. (
  642. procalign : 4;
  643. loopalign : 4;
  644. jumpalign : 0;
  645. constalignmin : 0;
  646. constalignmax : 8;
  647. varalignmin : 0;
  648. varalignmax : 8;
  649. localalignmin : 4;
  650. localalignmax : 8;
  651. recordalignmin : 0;
  652. recordalignmax : 8;
  653. maxCrecordalign : 8
  654. );
  655. first_parm_offset : 8;
  656. stacksize : 8*1024*1024;
  657. stackalign : 8;
  658. abi : abi_eabi
  659. );
  660. {$else FPC_ARMEL}
  661. {$ifdef FPC_ARMEB}
  662. system_arm_linux_info : tsysteminfo =
  663. (
  664. system : system_arm_Linux;
  665. name : 'Linux for ARMEB';
  666. shortname : 'Linux';
  667. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  668. tf_requires_proper_alignment,
  669. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  670. cpu : cpu_arm;
  671. unit_env : 'LINUXUNITS';
  672. extradefines : 'UNIX;HASUNIX;CPUARMEB';
  673. exeext : '';
  674. defext : '.def';
  675. scriptext : '.sh';
  676. smartext : '.sl';
  677. unitext : '.ppu';
  678. unitlibext : '.ppl';
  679. asmext : '.s';
  680. objext : '.o';
  681. resext : '.res';
  682. resobjext : '.or';
  683. sharedlibext : '.so';
  684. staticlibext : '.a';
  685. staticlibprefix : 'libp';
  686. sharedlibprefix : 'lib';
  687. sharedClibext : '.so';
  688. staticClibext : '.a';
  689. staticClibprefix : 'lib';
  690. sharedClibprefix : 'lib';
  691. importlibprefix : 'libimp';
  692. importlibext : '.a';
  693. Cprefix : '';
  694. newline : #10;
  695. dirsep : '/';
  696. assem : as_gas;
  697. assemextern : as_gas;
  698. link : nil;
  699. linkextern : nil;
  700. ar : ar_gnu_ar;
  701. res : res_elf;
  702. dbg : dbg_stabs;
  703. script : script_unix;
  704. endian : endian_big;
  705. alignment :
  706. (
  707. procalign : 4;
  708. loopalign : 4;
  709. jumpalign : 0;
  710. constalignmin : 0;
  711. constalignmax : 4;
  712. varalignmin : 0;
  713. varalignmax : 4;
  714. localalignmin : 4;
  715. localalignmax : 8;
  716. recordalignmin : 0;
  717. recordalignmax : 4;
  718. maxCrecordalign : 4
  719. );
  720. first_parm_offset : 8;
  721. stacksize : 8*1024*1024;
  722. stackalign : 4;
  723. abi : abi_default
  724. );
  725. {$else FPC_ARMEB}
  726. system_arm_linux_info : tsysteminfo =
  727. (
  728. system : system_arm_Linux;
  729. name : 'Linux for ARM';
  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';
  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_little;
  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 : 4;
  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. {$endif FPC_ARMEB}
  790. {$endif FPC_ARMEL}
  791. {$endif FPC_ARMHF}
  792. system_mipseb_linux_info : tsysteminfo =
  793. (
  794. system : system_mipseb_LINUX;
  795. name : 'Linux for MIPSEB';
  796. shortname : 'Linux';
  797. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  798. tf_requires_proper_alignment,
  799. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  800. cpu : cpu_mipseb;
  801. unit_env : 'LINUXUNITS';
  802. extradefines : 'UNIX;HASUNIX';
  803. exeext : '';
  804. defext : '.def';
  805. scriptext : '.sh';
  806. smartext : '.sl';
  807. unitext : '.ppu';
  808. unitlibext : '.ppl';
  809. asmext : '.s';
  810. objext : '.o';
  811. resext : '.res';
  812. resobjext : '.or';
  813. sharedlibext : '.so';
  814. staticlibext : '.a';
  815. staticlibprefix : 'libp';
  816. sharedlibprefix : 'lib';
  817. sharedClibext : '.so';
  818. staticClibext : '.a';
  819. staticClibprefix : 'lib';
  820. sharedClibprefix : 'lib';
  821. importlibprefix : 'libimp';
  822. importlibext : '.a';
  823. // p_ext_support : false;
  824. Cprefix : '';
  825. newline : #10;
  826. dirsep : '/';
  827. assem : as_gas;
  828. assemextern : as_gas;
  829. link : nil;
  830. linkextern : nil;
  831. ar : ar_gnu_ar;
  832. res : res_elf;
  833. dbg : dbg_stabs;
  834. script : script_unix;
  835. endian : endian_big;
  836. alignment :
  837. (
  838. procalign : 4;
  839. loopalign : 4;
  840. jumpalign : 0;
  841. constalignmin : 0;
  842. constalignmax : 8;
  843. varalignmin : 0;
  844. varalignmax : 8;
  845. localalignmin : 4;
  846. localalignmax : 8;
  847. recordalignmin : 0;
  848. recordalignmax : 8;
  849. maxCrecordalign : 8
  850. );
  851. first_parm_offset : 0;
  852. stacksize : 32*1024*1024;
  853. stackalign : 8;
  854. abi : abi_default
  855. );
  856. system_mipsel_linux_info : tsysteminfo =
  857. (
  858. system : system_mipsel_LINUX;
  859. name : 'Linux for MIPSEL';
  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_mipsel;
  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_little;
  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. implementation
  921. initialization
  922. {$ifdef CPU86}
  923. {$ifdef linux}
  924. { some FreeBSD versions define linux as well }
  925. {$ifndef FreeBSD}
  926. set_source_info(system_i386_linux_info);
  927. {$endif FreeBSD}
  928. {$endif}
  929. {$endif CPU86}
  930. {$ifdef CPU68}
  931. {$ifdef linux}
  932. set_source_info(system_m68k_linux_info);
  933. {$endif linux}
  934. {$endif CPU68}
  935. {$ifdef CPUX86_64}
  936. {$ifdef linux}
  937. set_source_info(system_x86_64_linux_info);
  938. {$endif linux}
  939. {$endif CPUX86_64}
  940. {$ifdef CPUALPHA}
  941. {$ifdef linux}
  942. set_source_info(system_alpha_linux_info);
  943. {$endif linux}
  944. {$endif CPUALPHA}
  945. {$ifdef CPUSPARC}
  946. {$ifdef linux}
  947. set_source_info(system_sparc_linux_info);
  948. {$endif linux}
  949. {$endif CPUSPARC}
  950. {$ifdef CPUPOWERPC32}
  951. {$ifdef linux}
  952. set_source_info(system_powerpc_linux_info);
  953. {$endif linux}
  954. {$endif CPUPOWERPC32}
  955. {$ifdef CPUPOWERPC64}
  956. {$ifdef linux}
  957. set_source_info(system_powerpc64_linux_info);
  958. {$endif linux}
  959. {$endif CPUPOWERPC64}
  960. {$ifdef CPUARM}
  961. {$ifdef linux}
  962. set_source_info(system_arm_linux_info);
  963. {$endif linux}
  964. {$endif CPUARM}
  965. {$ifdef CPUMIPSEB}
  966. {$ifdef linux}
  967. set_source_info(system_mipseb_linux_info);
  968. {$endif linux}
  969. {$endif CPUMIPSEB}
  970. {$ifdef CPUMIPSEL}
  971. {$ifdef linux}
  972. set_source_info(system_mipsel_linux_info);
  973. {$endif linux}
  974. {$endif CPUMIPSEL}
  975. end.