i_linux.pas 35 KB

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