i_linux.pas 35 KB

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