i_bsd.pas 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929
  1. {
  2. Copyright (c) 1998-2008 by Peter Vreman
  3. This unit implements support information structures for FreeBSD/NetBSD
  4. and OpenBSD
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. ****************************************************************************
  17. }
  18. { This unit implements support information structures for FreeBSD/NetBSD.
  19. OpenBSD is only added for i386 for now, though it exists for most
  20. other common CPU's too}
  21. unit i_bsd;
  22. {$i fpcdefs.inc}
  23. interface
  24. uses
  25. systems;
  26. const
  27. system_aarch64_freebsd_info : tsysteminfo =
  28. (
  29. system : system_aarch64_freebsd;
  30. name : 'FreeBSD for aarch64';
  31. shortname : 'FreeBSD';
  32. flags : [tf_needs_symbol_size,
  33. tf_needs_symbol_type,
  34. tf_files_case_sensitive,
  35. tf_requires_proper_alignment,tf_safecall_exceptions,
  36. tf_smartlink_sections,tf_pic_uses_got,
  37. tf_has_winlike_resources
  38. {$ifdef llvm}
  39. ,tf_use_psabieh
  40. {$endif llvm}
  41. ,tf_supports_hidden_symbols
  42. ];
  43. cpu : cpu_aarch64;
  44. unit_env : 'BSDUNITS';
  45. extradefines : 'UNIX;HASUNIX;BSD';
  46. exeext : '';
  47. defext : '.def';
  48. scriptext : '.sh';
  49. smartext : '.sl';
  50. unitext : '.ppu';
  51. unitlibext : '.ppl';
  52. asmext : '.s';
  53. objext : '.o';
  54. resext : '.res';
  55. resobjext : '.or';
  56. sharedlibext : '.so';
  57. staticlibext : '.a';
  58. staticlibprefix : 'libp';
  59. sharedlibprefix : 'lib';
  60. sharedClibext : '.so';
  61. staticClibext : '.a';
  62. staticClibprefix : 'lib';
  63. sharedClibprefix : 'lib';
  64. importlibprefix : 'libimp';
  65. importlibext : '.a';
  66. Cprefix : '';
  67. newline : #10;
  68. dirsep : '/';
  69. assem : as_gas;
  70. assemextern : as_gas;
  71. link : ld_none;
  72. linkextern : ld_bsd;
  73. ar : ar_gnu_ar;
  74. res : res_elf;
  75. dbg : dbg_dwarf2; //dbg_stabs;
  76. script : script_unix;
  77. endian : endian_little;
  78. alignment :
  79. (
  80. procalign : 8;
  81. loopalign : 4;
  82. jumpalign : 0;
  83. jumpalignskipmax : 0;
  84. coalescealign : 0;
  85. coalescealignskipmax: 0;
  86. constalignmin : 0;
  87. constalignmax : 16;
  88. varalignmin : 0;
  89. varalignmax : 16;
  90. localalignmin : 4;
  91. localalignmax : 16;
  92. recordalignmin : 0;
  93. recordalignmax : 16;
  94. maxCrecordalign : 16
  95. );
  96. first_parm_offset : 16;
  97. stacksize : 8*1024*1024;
  98. stackalign : 16;
  99. abi : abi_default;
  100. llvmdatalayout : 'e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128'
  101. );
  102. system_i386_freebsd_info : tsysteminfo =
  103. (
  104. system : system_i386_FreeBSD;
  105. name : 'FreeBSD/ELF for i386';
  106. shortname : 'FreeBSD';
  107. flags : [tf_pic_uses_got,tf_files_case_sensitive,
  108. {$ifdef tls_threadvars}
  109. tf_section_threadvars,
  110. {$endif tls_threadvars}
  111. tf_needs_symbol_type,tf_needs_symbol_size
  112. ,tf_smartlink_sections,tf_has_winlike_resources
  113. ,tf_supports_hidden_symbols];
  114. cpu : cpu_i386;
  115. unit_env : 'BSDUNITS';
  116. extradefines : 'UNIX;BSD;HASUNIX';
  117. exeext : '';
  118. defext : '.def';
  119. scriptext : '.sh';
  120. smartext : '.sl';
  121. unitext : '.ppu';
  122. unitlibext : '.ppl';
  123. asmext : '.s';
  124. objext : '.o';
  125. resext : '.res';
  126. resobjext : '.or';
  127. sharedlibext : '.so';
  128. staticlibext : '.a';
  129. staticlibprefix : 'libp';
  130. sharedlibprefix : 'lib';
  131. sharedClibext : '.so';
  132. staticClibext : '.a';
  133. staticClibprefix : 'lib';
  134. sharedClibprefix : 'lib';
  135. importlibprefix : 'libimp';
  136. importlibext : '.a';
  137. Cprefix : '';
  138. newline : #10;
  139. dirsep : '/';
  140. assem : as_i386_elf32;
  141. assemextern : as_gas;
  142. link : ld_none;
  143. linkextern : ld_bsd;
  144. ar : ar_gnu_ar;
  145. res : res_elf;
  146. dbg : dbg_stabs;
  147. script : script_unix;
  148. endian : endian_little;
  149. alignment :
  150. (
  151. procalign : 4;
  152. loopalign : 4;
  153. jumpalign : 0;
  154. jumpalignskipmax : 0;
  155. coalescealign : 0;
  156. coalescealignskipmax: 0;
  157. constalignmin : 0;
  158. constalignmax : 4;
  159. varalignmin : 0;
  160. varalignmax : 4;
  161. localalignmin : 0;
  162. localalignmax : 4;
  163. recordalignmin : 0;
  164. recordalignmax : 2;
  165. maxCrecordalign : 4
  166. );
  167. first_parm_offset : 8;
  168. stacksize : 262144;
  169. stackalign : 4;
  170. abi : abi_default;
  171. { note: default LLVM stack alignment is 16 bytes for this target }
  172. llvmdatalayout : 'e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S32';
  173. );
  174. system_powerpc64_freebsd_info : tsysteminfo =
  175. (
  176. system : system_powerpc64_freebsd;
  177. name : 'FreeBSD for PowerPC64';
  178. shortname : 'FreeBSD';
  179. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  180. tf_requires_proper_alignment,tf_safecall_exceptions,tf_smartlink_sections,tf_has_winlike_resources,
  181. tf_supports_hidden_symbols];
  182. cpu : cpu_powerpc64;
  183. unit_env : 'BSDUNITS';
  184. extradefines : 'UNIX;HASUNIX;BSD';
  185. exeext : '';
  186. defext : '.def';
  187. scriptext : '.sh';
  188. smartext : '.sl';
  189. unitext : '.ppu';
  190. unitlibext : '.ppl';
  191. asmext : '.s';
  192. objext : '.o';
  193. resext : '.res';
  194. resobjext : '.or';
  195. sharedlibext : '.so';
  196. staticlibext : '.a';
  197. staticlibprefix : 'libp';
  198. sharedlibprefix : 'lib';
  199. sharedClibext : '.so';
  200. staticClibext : '.a';
  201. staticClibprefix : 'lib';
  202. sharedClibprefix : 'lib';
  203. importlibprefix : 'libimp';
  204. importlibext : '.a';
  205. Cprefix : '';
  206. newline : #10;
  207. dirsep : '/';
  208. assem : as_gas;
  209. assemextern : as_gas;
  210. link : ld_none;
  211. linkextern : ld_bsd;
  212. ar : ar_gnu_ar;
  213. res : res_elf;
  214. dbg : dbg_dwarf2;
  215. script : script_unix;
  216. endian : endian_big;
  217. alignment :
  218. (
  219. procalign : 8;
  220. loopalign : 4;
  221. jumpalign : 0;
  222. jumpalignskipmax : 0;
  223. coalescealign : 0;
  224. coalescealignskipmax: 0;
  225. constalignmin : 4;
  226. constalignmax : 16;
  227. varalignmin : 4;
  228. varalignmax : 16;
  229. localalignmin : 0;
  230. localalignmax : 16;
  231. recordalignmin : 0;
  232. recordalignmax : 16;
  233. maxCrecordalign : 16
  234. );
  235. first_parm_offset : 8;
  236. stacksize : 10*1024*1024;
  237. stackalign : 16;
  238. abi : abi_powerpc_elfv2;
  239. llvmdatalayout : 'E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:64:64-v128:128:128-n32:64';
  240. );
  241. system_x86_64_freebsd_info : tsysteminfo =
  242. (
  243. system : system_x86_64_freebsd;
  244. name : 'FreeBSD for x86-64';
  245. shortname : 'FreeBSD';
  246. flags : [tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_library_needs_pic,tf_needs_symbol_type,
  247. tf_files_case_sensitive,
  248. tf_dwarf_only_local_labels,
  249. {tf_pic_uses_got,}tf_smartlink_sections,tf_has_winlike_resources,tf_supports_hidden_symbols];
  250. cpu : cpu_x86_64;
  251. unit_env : 'BSDUNITS';
  252. extradefines : 'UNIX;HASUNIX;BSD';
  253. exeext : '';
  254. defext : '.def';
  255. scriptext : '.sh';
  256. smartext : '.sl';
  257. unitext : '.ppu';
  258. unitlibext : '.ppl';
  259. asmext : '.s';
  260. objext : '.o';
  261. resext : '.res';
  262. resobjext : '.or';
  263. sharedlibext : '.so';
  264. staticlibext : '.a';
  265. staticlibprefix : 'libp';
  266. sharedlibprefix : 'lib';
  267. sharedClibext : '.so';
  268. staticClibext : '.a';
  269. staticClibprefix : 'lib';
  270. sharedClibprefix : 'lib';
  271. importlibprefix : 'libimp';
  272. importlibext : '.a';
  273. Cprefix : '';
  274. newline : #10;
  275. dirsep : '/';
  276. assem : as_x86_64_elf64;
  277. assemextern : as_gas;
  278. link : ld_none;
  279. linkextern : ld_bsd;
  280. ar : ar_gnu_ar;
  281. res : res_elf;
  282. dbg : dbg_dwarf2; //dbg_stabs;
  283. script : script_unix;
  284. endian : endian_little;
  285. alignment :
  286. (
  287. procalign : 8;
  288. loopalign : 4;
  289. jumpalign : 0;
  290. jumpalignskipmax : 0;
  291. coalescealign : 0;
  292. coalescealignskipmax: 0;
  293. constalignmin : 0;
  294. constalignmax : 16;
  295. varalignmin : 0;
  296. varalignmax : 16;
  297. localalignmin : 4;
  298. localalignmax : 16;
  299. recordalignmin : 0;
  300. recordalignmax : 16;
  301. maxCrecordalign : 16
  302. );
  303. first_parm_offset : 16;
  304. stacksize : 8*1024*1024;
  305. stackalign : 16;
  306. abi : abi_default;
  307. llvmdatalayout : 'e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128';
  308. );
  309. system_x86_64_dragonfly_info : tsysteminfo =
  310. (
  311. system : system_x86_64_dragonfly;
  312. name : 'DragonFly for x86-64';
  313. shortname : 'DragonFly';
  314. flags : [tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_library_needs_pic,tf_needs_symbol_type,
  315. tf_files_case_sensitive,
  316. tf_dwarf_only_local_labels,
  317. {tf_pic_uses_got,}tf_smartlink_sections,tf_has_winlike_resources,tf_supports_hidden_symbols];
  318. cpu : cpu_x86_64;
  319. unit_env : 'BSDUNITS';
  320. extradefines : 'UNIX;HASUNIX;BSD';
  321. exeext : '';
  322. defext : '.def';
  323. scriptext : '.sh';
  324. smartext : '.sl';
  325. unitext : '.ppu';
  326. unitlibext : '.ppl';
  327. asmext : '.s';
  328. objext : '.o';
  329. resext : '.res';
  330. resobjext : '.or';
  331. sharedlibext : '.so';
  332. staticlibext : '.a';
  333. staticlibprefix : 'libp';
  334. sharedlibprefix : 'lib';
  335. sharedClibext : '.so';
  336. staticClibext : '.a';
  337. staticClibprefix : 'lib';
  338. sharedClibprefix : 'lib';
  339. importlibprefix : 'libimp';
  340. importlibext : '.a';
  341. Cprefix : '';
  342. newline : #10;
  343. dirsep : '/';
  344. assem : as_x86_64_elf64;
  345. assemextern : as_gas;
  346. link : ld_none;
  347. linkextern : ld_bsd;
  348. ar : ar_gnu_ar;
  349. res : res_elf;
  350. dbg : dbg_dwarf2; //dbg_stabs;
  351. script : script_unix;
  352. endian : endian_little;
  353. alignment :
  354. (
  355. procalign : 8;
  356. loopalign : 4;
  357. jumpalign : 0;
  358. jumpalignskipmax : 0;
  359. coalescealign : 0;
  360. coalescealignskipmax: 0;
  361. constalignmin : 0;
  362. constalignmax : 16;
  363. varalignmin : 0;
  364. varalignmax : 16;
  365. localalignmin : 4;
  366. localalignmax : 16;
  367. recordalignmin : 0;
  368. recordalignmax : 16;
  369. maxCrecordalign : 16
  370. );
  371. first_parm_offset : 16;
  372. stacksize : 8*1024*1024;
  373. stackalign : 16;
  374. abi : abi_default;
  375. llvmdatalayout : 'e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128';
  376. );
  377. system_i386_netbsd_info : tsysteminfo =
  378. (
  379. system : system_i386_NetBSD;
  380. name : 'NetBSD for i386';
  381. shortname : 'NetBSD';
  382. flags : [tf_pic_uses_got,tf_under_development,tf_files_case_sensitive,tf_smartlink_library,tf_has_winlike_resources,
  383. tf_supports_hidden_symbols];
  384. cpu : cpu_i386;
  385. unit_env : 'BSDUNITS';
  386. extradefines : 'UNIX;BSD;HASUNIX';
  387. exeext : '';
  388. defext : '.def';
  389. scriptext : '.sh';
  390. smartext : '.sl';
  391. unitext : '.ppu';
  392. unitlibext : '.ppl';
  393. asmext : '.s';
  394. objext : '.o';
  395. resext : '.res';
  396. resobjext : '.or';
  397. sharedlibext : '.so';
  398. staticlibext : '.a';
  399. staticlibprefix : 'libp';
  400. sharedlibprefix : 'lib';
  401. sharedClibext : '.so';
  402. staticClibext : '.a';
  403. staticClibprefix : 'lib';
  404. sharedClibprefix : 'lib';
  405. importlibprefix : 'libimp';
  406. importlibext : '.a';
  407. Cprefix : '';
  408. newline : #10;
  409. dirsep : '/';
  410. assem : as_i386_elf32;
  411. assemextern : as_gas;
  412. link : ld_none;
  413. linkextern : ld_bsd;
  414. ar : ar_gnu_ar;
  415. res : res_elf;
  416. dbg : dbg_stabs;
  417. script : script_unix;
  418. endian : endian_little;
  419. alignment :
  420. (
  421. procalign : 16;
  422. loopalign : 4;
  423. jumpalign : 0;
  424. jumpalignskipmax : 0;
  425. coalescealign : 0;
  426. coalescealignskipmax: 0;
  427. constalignmin : 0;
  428. constalignmax : 16;
  429. varalignmin : 0;
  430. varalignmax : 16;
  431. localalignmin : 4;
  432. localalignmax : 8;
  433. recordalignmin : 0;
  434. recordalignmax : 16;
  435. maxCrecordalign : 4
  436. );
  437. first_parm_offset : 8;
  438. stacksize : 262144;
  439. stackalign : 4;
  440. abi : abi_default;
  441. llvmdatalayout : 'e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S32';
  442. );
  443. system_i386_openbsd_info : tsysteminfo =
  444. (
  445. system : system_i386_OpenBSD;
  446. name : 'OpenBSD for i386';
  447. shortname : 'OpenBSD';
  448. flags : [tf_pic_default,tf_pic_uses_got,tf_under_development,tf_files_case_sensitive,tf_smartlink_sections,tf_has_winlike_resources,
  449. tf_supports_hidden_symbols];
  450. cpu : cpu_i386;
  451. unit_env : 'BSDUNITS';
  452. extradefines : 'UNIX;BSD;HASUNIX';
  453. exeext : '';
  454. defext : '.def';
  455. scriptext : '.sh';
  456. smartext : '.sl';
  457. unitext : '.ppu';
  458. unitlibext : '.ppl';
  459. asmext : '.s';
  460. objext : '.o';
  461. resext : '.res';
  462. resobjext : '.or';
  463. sharedlibext : '.so';
  464. staticlibext : '.a';
  465. staticlibprefix : 'libp';
  466. sharedlibprefix : 'lib';
  467. sharedClibext : '.so';
  468. staticClibext : '.a';
  469. staticClibprefix : 'lib';
  470. sharedClibprefix : 'lib';
  471. importlibprefix : 'libimp';
  472. importlibext : '.a';
  473. Cprefix : '';
  474. newline : #10;
  475. dirsep : '/';
  476. assem : as_gas;
  477. assemextern : as_gas;
  478. link : ld_none;
  479. linkextern : ld_bsd;
  480. ar : ar_gnu_ar;
  481. res : res_elf;
  482. dbg : dbg_stabs;
  483. script : script_unix;
  484. endian : endian_little;
  485. alignment :
  486. (
  487. procalign : 16;
  488. loopalign : 4;
  489. jumpalign : 0;
  490. jumpalignskipmax : 0;
  491. coalescealign : 0;
  492. coalescealignskipmax: 0;
  493. constalignmin : 0;
  494. constalignmax : 16;
  495. varalignmin : 0;
  496. varalignmax : 16;
  497. localalignmin : 4;
  498. localalignmax : 8;
  499. recordalignmin : 0;
  500. recordalignmax : 16;
  501. maxCrecordalign : 4
  502. );
  503. first_parm_offset : 8;
  504. stacksize : 262144;
  505. stackalign : 4;
  506. abi : abi_default;
  507. { note: default LLVM stack alignment is 16 bytes for this target }
  508. llvmdatalayout : 'e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S32';
  509. );
  510. system_x86_64_openbsd_info : tsysteminfo =
  511. (
  512. system : system_x86_64_openbsd;
  513. name : 'OpenBSD for x86-64';
  514. shortname : 'OpenBSD';
  515. flags : [tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_library_needs_pic,tf_needs_symbol_type,
  516. tf_files_case_sensitive, tf_under_development,
  517. tf_dwarf_only_local_labels, tf_pic_default,
  518. {$ifdef llvm}
  519. tf_use_psabieh,
  520. {$endif llvm}
  521. { tf_pic_uses_got,}tf_smartlink_sections,tf_has_winlike_resources,tf_supports_hidden_symbols];
  522. cpu : cpu_x86_64;
  523. unit_env : 'BSDUNITS';
  524. extradefines : 'UNIX;HASUNIX;BSD';
  525. exeext : '';
  526. defext : '.def';
  527. scriptext : '.sh';
  528. smartext : '.sl';
  529. unitext : '.ppu';
  530. unitlibext : '.ppl';
  531. asmext : '.s';
  532. objext : '.o';
  533. resext : '.res';
  534. resobjext : '.or';
  535. sharedlibext : '.so';
  536. staticlibext : '.a';
  537. staticlibprefix : 'libp';
  538. sharedlibprefix : 'lib';
  539. sharedClibext : '.so';
  540. staticClibext : '.a';
  541. staticClibprefix : 'lib';
  542. sharedClibprefix : 'lib';
  543. importlibprefix : 'libimp';
  544. importlibext : '.a';
  545. Cprefix : '';
  546. newline : #10;
  547. dirsep : '/';
  548. assem : as_x86_64_elf64;
  549. assemextern : as_gas;
  550. link : ld_none;
  551. linkextern : ld_bsd;
  552. ar : ar_gnu_ar;
  553. res : res_elf;
  554. dbg : dbg_dwarf2; //dbg_stabs;
  555. script : script_unix;
  556. endian : endian_little;
  557. alignment :
  558. (
  559. procalign : 8;
  560. loopalign : 4;
  561. jumpalign : 0;
  562. jumpalignskipmax : 0;
  563. coalescealign : 0;
  564. coalescealignskipmax: 0;
  565. constalignmin : 0;
  566. constalignmax : 16;
  567. varalignmin : 0;
  568. varalignmax : 16;
  569. localalignmin : 4;
  570. localalignmax : 16;
  571. recordalignmin : 0;
  572. recordalignmax : 16;
  573. maxCrecordalign : 16
  574. );
  575. first_parm_offset : 16;
  576. stacksize : 8*1024*1024;
  577. stackalign : 16;
  578. abi : abi_default;
  579. llvmdatalayout : 'e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128';
  580. );
  581. system_m68k_netbsd_info : tsysteminfo =
  582. (
  583. system : system_m68k_NetBSD;
  584. name : 'NetBSD for m68k';
  585. shortname : 'NetBSD';
  586. flags : [tf_under_development,tf_needs_symbol_size,tf_needs_symbol_type,tf_requires_proper_alignment,
  587. tf_files_case_sensitive,tf_smartlink_sections,tf_has_winlike_resources,tf_supports_hidden_symbols];
  588. cpu : cpu_m68k;
  589. unit_env : 'BSDUNITS';
  590. extradefines : 'UNIX;BSD;HASUNIX';
  591. exeext : '';
  592. defext : '.def';
  593. scriptext : '.sh';
  594. smartext : '.sl';
  595. unitext : '.ppu';
  596. unitlibext : '.ppl';
  597. asmext : '.s';
  598. objext : '.o';
  599. resext : '.res';
  600. resobjext : '.or';
  601. sharedlibext : '.so';
  602. staticlibext : '.a';
  603. staticlibprefix : 'libp';
  604. sharedlibprefix : 'lib';
  605. sharedClibext : '.so';
  606. staticClibext : '.a';
  607. staticClibprefix : 'lib';
  608. sharedClibprefix : 'lib';
  609. importlibprefix : 'libimp';
  610. importlibext : '.a';
  611. Cprefix : '';
  612. newline : #10;
  613. dirsep : '/';
  614. assem : as_gas;
  615. assemextern : as_gas;
  616. link : ld_none;
  617. linkextern : ld_bsd;
  618. ar : ar_gnu_ar;
  619. res : res_elf;
  620. dbg : dbg_stabs;
  621. script : script_unix;
  622. endian : endian_big;
  623. alignment :
  624. (
  625. procalign : 4;
  626. loopalign : 4;
  627. jumpalign : 0;
  628. jumpalignskipmax : 0;
  629. coalescealign : 0;
  630. coalescealignskipmax: 0;
  631. constalignmin : 0;
  632. constalignmax : 1;
  633. varalignmin : 0;
  634. varalignmax : 1;
  635. localalignmin : 0;
  636. localalignmax : 1;
  637. recordalignmin : 0;
  638. recordalignmax : 4;
  639. maxCrecordalign : 8
  640. );
  641. first_parm_offset : 8;
  642. stacksize : 262144;
  643. stackalign : 4;
  644. abi : abi_default;
  645. llvmdatalayout : 'todo';
  646. );
  647. system_powerpc_netbsd_info : tsysteminfo =
  648. (
  649. system : system_powerpc_netbsd;
  650. name : 'NetBSD for PowerPC';
  651. shortname : 'NetBSD';
  652. flags : [tf_under_development,tf_files_case_sensitive,tf_smartlink_library,tf_has_winlike_resources,tf_supports_hidden_symbols];
  653. cpu : cpu_powerpc;
  654. unit_env : '';
  655. extradefines : 'UNIX;BSD;HASUNIX';
  656. exeext : '';
  657. defext : '.def';
  658. scriptext : '.sh';
  659. smartext : '.sl';
  660. unitext : '.ppu';
  661. unitlibext : '.ppl';
  662. asmext : '.s';
  663. objext : '.o';
  664. resext : '.res';
  665. resobjext : '.or';
  666. sharedlibext : '.so';
  667. staticlibext : '.s';
  668. staticlibprefix : 'libp';
  669. sharedlibprefix : 'lib';
  670. sharedClibext : '.so';
  671. staticClibext : '.a';
  672. staticClibprefix : 'lib';
  673. sharedClibprefix : 'lib';
  674. importlibprefix : 'libimp';
  675. importlibext : '.a';
  676. Cprefix : '';
  677. newline : #10;
  678. dirsep : '/';
  679. assem : as_gas;
  680. assemextern : as_gas;
  681. link : ld_none;
  682. linkextern : ld_bsd;
  683. ar : ar_gnu_ar;
  684. res : res_elf;
  685. dbg : dbg_stabs;
  686. script : script_unix;
  687. endian : endian_big;
  688. alignment :
  689. (
  690. procalign : 4;
  691. loopalign : 4;
  692. jumpalign : 0;
  693. jumpalignskipmax : 0;
  694. coalescealign : 0;
  695. coalescealignskipmax: 0;
  696. constalignmin : 0;
  697. constalignmax : 4;
  698. varalignmin : 0;
  699. varalignmax : 4;
  700. localalignmin : 0;
  701. localalignmax : 4;
  702. recordalignmin : 0;
  703. recordalignmax : 2;
  704. maxCrecordalign : 4 // should be 8 probably
  705. );
  706. first_parm_offset : 8;
  707. stacksize : 32*1024*1024;
  708. stackalign : 16;
  709. { abi_powerpc_sysv doesn't work yet }
  710. abi : abi_powerpc_aix;
  711. llvmdatalayout : 'E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32';
  712. );
  713. system_x86_64_netbsd_info : tsysteminfo =
  714. (
  715. system : system_x86_64_netbsd;
  716. name : 'NetBSD for x86-64';
  717. shortname : 'NetBSD';
  718. flags : [tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_library_needs_pic,tf_needs_symbol_type,
  719. tf_files_case_sensitive, tf_under_development,
  720. tf_dwarf_only_local_labels,
  721. { tf_pic_uses_got,}tf_smartlink_sections,tf_has_winlike_resources,tf_supports_hidden_symbols];
  722. cpu : cpu_x86_64;
  723. unit_env : 'BSDUNITS';
  724. extradefines : 'UNIX;HASUNIX;BSD';
  725. exeext : '';
  726. defext : '.def';
  727. scriptext : '.sh';
  728. smartext : '.sl';
  729. unitext : '.ppu';
  730. unitlibext : '.ppl';
  731. asmext : '.s';
  732. objext : '.o';
  733. resext : '.res';
  734. resobjext : '.or';
  735. sharedlibext : '.so';
  736. staticlibext : '.a';
  737. staticlibprefix : 'libp';
  738. sharedlibprefix : 'lib';
  739. sharedClibext : '.so';
  740. staticClibext : '.a';
  741. staticClibprefix : 'lib';
  742. sharedClibprefix : 'lib';
  743. importlibprefix : 'libimp';
  744. importlibext : '.a';
  745. Cprefix : '';
  746. newline : #10;
  747. dirsep : '/';
  748. assem : as_x86_64_elf64;
  749. assemextern : as_gas;
  750. link : ld_none;
  751. linkextern : ld_bsd;
  752. ar : ar_gnu_ar;
  753. res : res_elf;
  754. dbg : dbg_dwarf2; //dbg_stabs;
  755. script : script_unix;
  756. endian : endian_little;
  757. alignment :
  758. (
  759. procalign : 8;
  760. loopalign : 4;
  761. jumpalign : 0;
  762. jumpalignskipmax : 0;
  763. coalescealign : 0;
  764. coalescealignskipmax: 0;
  765. constalignmin : 0;
  766. constalignmax : 16;
  767. varalignmin : 0;
  768. varalignmax : 16;
  769. localalignmin : 4;
  770. localalignmax : 16;
  771. recordalignmin : 0;
  772. recordalignmax : 16;
  773. maxCrecordalign : 16
  774. );
  775. first_parm_offset : 16;
  776. stacksize : 8*1024*1024;
  777. stackalign : 16;
  778. abi : abi_default;
  779. llvmdatalayout : 'e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128';
  780. );
  781. system_arm_netbsd_info : tsysteminfo =
  782. (
  783. system : system_arm_netbsd;
  784. name : 'NetBSD for ARMHF';
  785. shortname : 'NetBSD';
  786. flags : [tf_under_development,tf_requires_proper_alignment,tf_files_case_sensitive,tf_smartlink_sections,tf_has_winlike_resources,
  787. tf_supports_hidden_symbols];
  788. cpu : cpu_arm;
  789. unit_env : '';
  790. extradefines : 'UNIX;BSD;HASUNIX';
  791. exeext : '';
  792. defext : '.def';
  793. scriptext : '.sh';
  794. smartext : '.sl';
  795. unitext : '.ppu';
  796. unitlibext : '.ppl';
  797. asmext : '.s';
  798. objext : '.o';
  799. resext : '.res';
  800. resobjext : '.or';
  801. sharedlibext : '.so';
  802. staticlibext : '.s';
  803. staticlibprefix : 'libp';
  804. sharedlibprefix : 'lib';
  805. sharedClibext : '.so';
  806. staticClibext : '.a';
  807. staticClibprefix : 'lib';
  808. sharedClibprefix : 'lib';
  809. importlibprefix : 'libimp';
  810. importlibext : '.a';
  811. Cprefix : '';
  812. newline : #10;
  813. dirsep : '/';
  814. assem : as_gas; {as_arm_elf32;}
  815. assemextern : as_gas;
  816. link : ld_none;
  817. linkextern : ld_bsd;
  818. ar : ar_gnu_ar;
  819. res : res_elf;
  820. dbg : dbg_dwarf2;
  821. script : script_unix;
  822. endian : endian_big;
  823. alignment :
  824. (
  825. procalign : 4;
  826. loopalign : 4;
  827. jumpalign : 0;
  828. jumpalignskipmax : 0;
  829. coalescealign : 0;
  830. coalescealignskipmax: 0;
  831. constalignmin : 0;
  832. constalignmax : 4;
  833. varalignmin : 0;
  834. varalignmax : 4;
  835. localalignmin : 0;
  836. localalignmax : 4;
  837. recordalignmin : 0;
  838. recordalignmax : 2;
  839. maxCrecordalign : 4 // should be 8 probably
  840. );
  841. first_parm_offset : 8;
  842. stacksize : 32*1024*1024;
  843. stackalign : 16;
  844. abi : abi_eabihf;
  845. llvmdatalayout : 'todo';
  846. );
  847. implementation
  848. initialization
  849. {$ifdef cpuaarch64}
  850. {$ifdef FreeBSD}
  851. set_source_info(system_aarch64_freebsd_info);
  852. {$endif FreeBSD}
  853. {$endif cpuaarch64}
  854. {$ifdef cpui386}
  855. {$ifdef FreeBSD}
  856. set_source_info(system_i386_FreeBSD_info);
  857. {$endif}
  858. {$ifdef NetBSD}
  859. set_source_info(system_i386_NetBSD_info);
  860. {$endif}
  861. {$ifdef OpenBSD}
  862. set_source_info(system_i386_OpenBSD_info);
  863. {$endif}
  864. {$endif cpui386}
  865. {$ifdef cpux86_64}
  866. {$ifdef FreeBSD}
  867. set_source_info(system_x86_64_FreeBSD_info);
  868. {$endif}
  869. {$ifdef DragonFly}
  870. set_source_info(system_x86_64_DragonFly_info);
  871. {$endif}
  872. {$ifdef OpenBSD}
  873. set_source_info(system_x86_64_OpenBSD_info);
  874. {$endif}
  875. {$ifdef NetBSD}
  876. set_source_info(system_x86_64_NetBSD_info);
  877. {$endif}
  878. {$endif}
  879. {$ifdef cpu68}
  880. {$ifdef NetBSD}
  881. set_source_info(system_m68k_NetBSD_info);
  882. {$endif NetBSD}
  883. {$endif cpu68}
  884. {$ifdef cpupowerpc32}
  885. {$ifdef NetBSD}
  886. set_source_info(system_powerpc_netbsd_info);
  887. {$endif}
  888. {$endif cpupowerpc32}
  889. {$ifdef cpupowerpc64}
  890. {$ifdef FreeBSD}
  891. { on a little endian PPC64 platform -> use little endian as default }
  892. {$ifdef FPC_LITTLE_ENDIAN}
  893. system_powerpc64_freebsd_info.endian:=endian_little;
  894. {$endif}
  895. set_source_info(system_powerpc64_freebsd_info);
  896. {$endif FreeBSD}
  897. {$endif powerpc64}
  898. {$ifdef cpuarm}
  899. {$ifdef NetBSD}
  900. set_source_info(system_arm_netbsd_info);
  901. {$endif}
  902. {$endif cpuarm}
  903. end.