i_bsd.pas 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790
  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. res_macho_info : tresinfo =
  28. (
  29. id : res_macho;
  30. resbin : 'fpcres';
  31. rescmd : '-o $OBJ -a $ARCH -s $SUBARCH -of mach-o $DBG';
  32. rcbin : 'windres';
  33. rccmd : '--include $INC -O res -D FPC -o $RES $RC';
  34. resourcefileclass : nil;
  35. resflags : [];
  36. );
  37. res_macosx_ext_info : tresinfo =
  38. (
  39. id : res_ext;
  40. resbin : 'fpcres';
  41. rescmd : '-o $OBJ -a $ENDIAN -of external $DBG';
  42. rcbin : 'windres';
  43. rccmd : '--include $INC -O res -D FPC -o $RES $RC';
  44. resourcefileclass : nil;
  45. resflags : [res_external_file,res_arch_in_file_name];
  46. );
  47. system_i386_freebsd_info : tsysteminfo =
  48. (
  49. system : system_i386_FreeBSD;
  50. name : 'FreeBSD/ELF for i386';
  51. shortname : 'FreeBSD';
  52. flags : [tf_pic_uses_got,tf_files_case_sensitive,
  53. {$ifdef tls_threadvars}
  54. tf_section_threadvars,
  55. {$endif tls_threadvars}
  56. tf_needs_symbol_type,tf_needs_symbol_size
  57. ,tf_smartlink_sections,tf_has_winlike_resources
  58. ,tf_supports_hidden_symbols];
  59. cpu : cpu_i386;
  60. unit_env : 'BSDUNITS';
  61. extradefines : 'UNIX;BSD;HASUNIX';
  62. exeext : '';
  63. defext : '.def';
  64. scriptext : '.sh';
  65. smartext : '.sl';
  66. unitext : '.ppu';
  67. unitlibext : '.ppl';
  68. asmext : '.s';
  69. objext : '.o';
  70. resext : '.res';
  71. resobjext : '.or';
  72. sharedlibext : '.so';
  73. staticlibext : '.a';
  74. staticlibprefix : 'libp';
  75. sharedlibprefix : 'lib';
  76. sharedClibext : '.so';
  77. staticClibext : '.a';
  78. staticClibprefix : 'lib';
  79. sharedClibprefix : 'lib';
  80. importlibprefix : 'libimp';
  81. importlibext : '.a';
  82. Cprefix : '';
  83. newline : #10;
  84. dirsep : '/';
  85. assem : as_i386_elf32;
  86. assemextern : as_gas;
  87. link : ld_none;
  88. linkextern : ld_bsd;
  89. ar : ar_gnu_ar;
  90. res : res_elf;
  91. dbg : dbg_stabs;
  92. script : script_unix;
  93. endian : endian_little;
  94. alignment :
  95. (
  96. procalign : 4;
  97. loopalign : 4;
  98. jumpalign : 0;
  99. jumpalignskipmax : 0;
  100. coalescealign : 0;
  101. coalescealignskipmax: 0;
  102. constalignmin : 0;
  103. constalignmax : 4;
  104. varalignmin : 0;
  105. varalignmax : 4;
  106. localalignmin : 0;
  107. localalignmax : 4;
  108. recordalignmin : 0;
  109. recordalignmax : 2;
  110. maxCrecordalign : 4
  111. );
  112. first_parm_offset : 8;
  113. stacksize : 262144;
  114. stackalign : 4;
  115. abi : abi_default;
  116. { note: default LLVM stack alignment is 16 bytes for this target }
  117. 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';
  118. );
  119. system_x86_64_freebsd_info : tsysteminfo =
  120. (
  121. system : system_x86_64_freebsd;
  122. name : 'FreeBSD for x86-64';
  123. shortname : 'FreeBSD';
  124. flags : [tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_library_needs_pic,tf_needs_symbol_type,
  125. tf_files_case_sensitive,
  126. tf_dwarf_only_local_labels,
  127. {tf_pic_uses_got,}tf_smartlink_sections,tf_has_winlike_resources,tf_supports_hidden_symbols];
  128. cpu : cpu_x86_64;
  129. unit_env : 'BSDUNITS';
  130. extradefines : 'UNIX;HASUNIX;BSD';
  131. exeext : '';
  132. defext : '.def';
  133. scriptext : '.sh';
  134. smartext : '.sl';
  135. unitext : '.ppu';
  136. unitlibext : '.ppl';
  137. asmext : '.s';
  138. objext : '.o';
  139. resext : '.res';
  140. resobjext : '.or';
  141. sharedlibext : '.so';
  142. staticlibext : '.a';
  143. staticlibprefix : 'libp';
  144. sharedlibprefix : 'lib';
  145. sharedClibext : '.so';
  146. staticClibext : '.a';
  147. staticClibprefix : 'lib';
  148. sharedClibprefix : 'lib';
  149. importlibprefix : 'libimp';
  150. importlibext : '.a';
  151. Cprefix : '';
  152. newline : #10;
  153. dirsep : '/';
  154. assem : as_x86_64_elf64;
  155. assemextern : as_gas;
  156. link : ld_none;
  157. linkextern : ld_bsd;
  158. ar : ar_gnu_ar;
  159. res : res_elf;
  160. dbg : dbg_dwarf2; //dbg_stabs;
  161. script : script_unix;
  162. endian : endian_little;
  163. alignment :
  164. (
  165. procalign : 8;
  166. loopalign : 4;
  167. jumpalign : 0;
  168. jumpalignskipmax : 0;
  169. coalescealign : 0;
  170. coalescealignskipmax: 0;
  171. constalignmin : 0;
  172. constalignmax : 16;
  173. varalignmin : 0;
  174. varalignmax : 16;
  175. localalignmin : 4;
  176. localalignmax : 16;
  177. recordalignmin : 0;
  178. recordalignmax : 16;
  179. maxCrecordalign : 16
  180. );
  181. first_parm_offset : 16;
  182. stacksize : 256*1024;
  183. stackalign : 16;
  184. abi : abi_default;
  185. 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';
  186. );
  187. system_x86_64_dragonfly_info : tsysteminfo =
  188. (
  189. system : system_x86_64_dragonfly;
  190. name : 'DragonFly for x86-64';
  191. shortname : 'DragonFly';
  192. flags : [tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_library_needs_pic,tf_needs_symbol_type,
  193. tf_files_case_sensitive,
  194. tf_dwarf_only_local_labels,
  195. {tf_pic_uses_got,}tf_smartlink_sections,tf_has_winlike_resources,tf_supports_hidden_symbols];
  196. cpu : cpu_x86_64;
  197. unit_env : 'BSDUNITS';
  198. extradefines : 'UNIX;HASUNIX;BSD';
  199. exeext : '';
  200. defext : '.def';
  201. scriptext : '.sh';
  202. smartext : '.sl';
  203. unitext : '.ppu';
  204. unitlibext : '.ppl';
  205. asmext : '.s';
  206. objext : '.o';
  207. resext : '.res';
  208. resobjext : '.or';
  209. sharedlibext : '.so';
  210. staticlibext : '.a';
  211. staticlibprefix : 'libp';
  212. sharedlibprefix : 'lib';
  213. sharedClibext : '.so';
  214. staticClibext : '.a';
  215. staticClibprefix : 'lib';
  216. sharedClibprefix : 'lib';
  217. importlibprefix : 'libimp';
  218. importlibext : '.a';
  219. Cprefix : '';
  220. newline : #10;
  221. dirsep : '/';
  222. assem : as_x86_64_elf64;
  223. assemextern : as_gas;
  224. link : ld_none;
  225. linkextern : ld_bsd;
  226. ar : ar_gnu_ar;
  227. res : res_elf;
  228. dbg : dbg_dwarf2; //dbg_stabs;
  229. script : script_unix;
  230. endian : endian_little;
  231. alignment :
  232. (
  233. procalign : 8;
  234. loopalign : 4;
  235. jumpalign : 0;
  236. jumpalignskipmax : 0;
  237. coalescealign : 0;
  238. coalescealignskipmax: 0;
  239. constalignmin : 0;
  240. constalignmax : 16;
  241. varalignmin : 0;
  242. varalignmax : 16;
  243. localalignmin : 4;
  244. localalignmax : 16;
  245. recordalignmin : 0;
  246. recordalignmax : 16;
  247. maxCrecordalign : 16
  248. );
  249. first_parm_offset : 16;
  250. stacksize : 256*1024;
  251. stackalign : 16;
  252. abi : abi_default;
  253. 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';
  254. );
  255. system_i386_netbsd_info : tsysteminfo =
  256. (
  257. system : system_i386_NetBSD;
  258. name : 'NetBSD for i386';
  259. shortname : 'NetBSD';
  260. flags : [tf_pic_uses_got,tf_under_development,tf_files_case_sensitive,tf_smartlink_library,tf_has_winlike_resources,
  261. tf_supports_hidden_symbols];
  262. cpu : cpu_i386;
  263. unit_env : 'BSDUNITS';
  264. extradefines : 'UNIX;BSD;HASUNIX';
  265. exeext : '';
  266. defext : '.def';
  267. scriptext : '.sh';
  268. smartext : '.sl';
  269. unitext : '.ppu';
  270. unitlibext : '.ppl';
  271. asmext : '.s';
  272. objext : '.o';
  273. resext : '.res';
  274. resobjext : '.or';
  275. sharedlibext : '.so';
  276. staticlibext : '.a';
  277. staticlibprefix : 'libp';
  278. sharedlibprefix : 'lib';
  279. sharedClibext : '.so';
  280. staticClibext : '.a';
  281. staticClibprefix : 'lib';
  282. sharedClibprefix : 'lib';
  283. importlibprefix : 'libimp';
  284. importlibext : '.a';
  285. Cprefix : '';
  286. newline : #10;
  287. dirsep : '/';
  288. assem : as_i386_elf32;
  289. assemextern : as_gas;
  290. link : ld_none;
  291. linkextern : ld_bsd;
  292. ar : ar_gnu_ar;
  293. res : res_elf;
  294. dbg : dbg_stabs;
  295. script : script_unix;
  296. endian : endian_little;
  297. alignment :
  298. (
  299. procalign : 16;
  300. loopalign : 4;
  301. jumpalign : 0;
  302. jumpalignskipmax : 0;
  303. coalescealign : 0;
  304. coalescealignskipmax: 0;
  305. constalignmin : 0;
  306. constalignmax : 16;
  307. varalignmin : 0;
  308. varalignmax : 16;
  309. localalignmin : 4;
  310. localalignmax : 8;
  311. recordalignmin : 0;
  312. recordalignmax : 16;
  313. maxCrecordalign : 4
  314. );
  315. first_parm_offset : 8;
  316. stacksize : 262144;
  317. stackalign : 4;
  318. abi : abi_default;
  319. 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';
  320. );
  321. system_i386_openbsd_info : tsysteminfo =
  322. (
  323. system : system_i386_OpenBSD;
  324. name : 'OpenBSD for i386';
  325. shortname : 'OpenBSD';
  326. flags : [tf_pic_default,tf_pic_uses_got,tf_under_development,tf_files_case_sensitive,tf_smartlink_sections,tf_has_winlike_resources,
  327. tf_supports_hidden_symbols];
  328. cpu : cpu_i386;
  329. unit_env : 'BSDUNITS';
  330. extradefines : 'UNIX;BSD;HASUNIX';
  331. exeext : '';
  332. defext : '.def';
  333. scriptext : '.sh';
  334. smartext : '.sl';
  335. unitext : '.ppu';
  336. unitlibext : '.ppl';
  337. asmext : '.s';
  338. objext : '.o';
  339. resext : '.res';
  340. resobjext : '.or';
  341. sharedlibext : '.so';
  342. staticlibext : '.a';
  343. staticlibprefix : 'libp';
  344. sharedlibprefix : 'lib';
  345. sharedClibext : '.so';
  346. staticClibext : '.a';
  347. staticClibprefix : 'lib';
  348. sharedClibprefix : 'lib';
  349. importlibprefix : 'libimp';
  350. importlibext : '.a';
  351. Cprefix : '';
  352. newline : #10;
  353. dirsep : '/';
  354. assem : as_gas;
  355. assemextern : as_gas;
  356. link : ld_none;
  357. linkextern : ld_bsd;
  358. ar : ar_gnu_ar;
  359. res : res_elf;
  360. dbg : dbg_stabs;
  361. script : script_unix;
  362. endian : endian_little;
  363. alignment :
  364. (
  365. procalign : 16;
  366. loopalign : 4;
  367. jumpalign : 0;
  368. jumpalignskipmax : 0;
  369. coalescealign : 0;
  370. coalescealignskipmax: 0;
  371. constalignmin : 0;
  372. constalignmax : 16;
  373. varalignmin : 0;
  374. varalignmax : 16;
  375. localalignmin : 4;
  376. localalignmax : 8;
  377. recordalignmin : 0;
  378. recordalignmax : 16;
  379. maxCrecordalign : 4
  380. );
  381. first_parm_offset : 8;
  382. stacksize : 262144;
  383. stackalign : 4;
  384. abi : abi_default;
  385. { note: default LLVM stack alignment is 16 bytes for this target }
  386. 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';
  387. );
  388. system_x86_64_openbsd_info : tsysteminfo =
  389. (
  390. system : system_x86_64_openbsd;
  391. name : 'OpenBSD for x86-64';
  392. shortname : 'OpenBSD';
  393. flags : [tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_library_needs_pic,tf_needs_symbol_type,
  394. tf_files_case_sensitive, tf_under_development,
  395. tf_dwarf_only_local_labels, tf_pic_default,
  396. { tf_pic_uses_got,}tf_smartlink_sections,tf_has_winlike_resources,tf_supports_hidden_symbols];
  397. cpu : cpu_x86_64;
  398. unit_env : 'BSDUNITS';
  399. extradefines : 'UNIX;HASUNIX;BSD';
  400. exeext : '';
  401. defext : '.def';
  402. scriptext : '.sh';
  403. smartext : '.sl';
  404. unitext : '.ppu';
  405. unitlibext : '.ppl';
  406. asmext : '.s';
  407. objext : '.o';
  408. resext : '.res';
  409. resobjext : '.or';
  410. sharedlibext : '.so';
  411. staticlibext : '.a';
  412. staticlibprefix : 'libp';
  413. sharedlibprefix : 'lib';
  414. sharedClibext : '.so';
  415. staticClibext : '.a';
  416. staticClibprefix : 'lib';
  417. sharedClibprefix : 'lib';
  418. importlibprefix : 'libimp';
  419. importlibext : '.a';
  420. Cprefix : '';
  421. newline : #10;
  422. dirsep : '/';
  423. assem : as_x86_64_elf64;
  424. assemextern : as_gas;
  425. link : ld_none;
  426. linkextern : ld_bsd;
  427. ar : ar_gnu_ar;
  428. res : res_elf;
  429. dbg : dbg_dwarf2; //dbg_stabs;
  430. script : script_unix;
  431. endian : endian_little;
  432. alignment :
  433. (
  434. procalign : 8;
  435. loopalign : 4;
  436. jumpalign : 0;
  437. jumpalignskipmax : 0;
  438. coalescealign : 0;
  439. coalescealignskipmax: 0;
  440. constalignmin : 0;
  441. constalignmax : 16;
  442. varalignmin : 0;
  443. varalignmax : 16;
  444. localalignmin : 4;
  445. localalignmax : 16;
  446. recordalignmin : 0;
  447. recordalignmax : 16;
  448. maxCrecordalign : 16
  449. );
  450. first_parm_offset : 16;
  451. stacksize : 256*1024;
  452. stackalign : 16;
  453. abi : abi_default;
  454. 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';
  455. );
  456. system_m68k_netbsd_info : tsysteminfo =
  457. (
  458. system : system_m68k_NetBSD;
  459. name : 'NetBSD for m68k';
  460. shortname : 'NetBSD';
  461. flags : [tf_under_development,tf_needs_symbol_size,tf_needs_symbol_type,tf_requires_proper_alignment,
  462. tf_files_case_sensitive,tf_smartlink_sections,tf_has_winlike_resources,tf_supports_hidden_symbols];
  463. cpu : cpu_m68k;
  464. unit_env : 'BSDUNITS';
  465. extradefines : 'UNIX;BSD;HASUNIX';
  466. exeext : '';
  467. defext : '.def';
  468. scriptext : '.sh';
  469. smartext : '.sl';
  470. unitext : '.ppu';
  471. unitlibext : '.ppl';
  472. asmext : '.s';
  473. objext : '.o';
  474. resext : '.res';
  475. resobjext : '.or';
  476. sharedlibext : '.so';
  477. staticlibext : '.a';
  478. staticlibprefix : 'libp';
  479. sharedlibprefix : 'lib';
  480. sharedClibext : '.so';
  481. staticClibext : '.a';
  482. staticClibprefix : 'lib';
  483. sharedClibprefix : 'lib';
  484. importlibprefix : 'libimp';
  485. importlibext : '.a';
  486. Cprefix : '';
  487. newline : #10;
  488. dirsep : '/';
  489. assem : as_gas;
  490. assemextern : as_gas;
  491. link : ld_none;
  492. linkextern : ld_bsd;
  493. ar : ar_gnu_ar;
  494. res : res_elf;
  495. dbg : dbg_stabs;
  496. script : script_unix;
  497. endian : endian_big;
  498. alignment :
  499. (
  500. procalign : 4;
  501. loopalign : 4;
  502. jumpalign : 0;
  503. jumpalignskipmax : 0;
  504. coalescealign : 0;
  505. coalescealignskipmax: 0;
  506. constalignmin : 0;
  507. constalignmax : 1;
  508. varalignmin : 0;
  509. varalignmax : 1;
  510. localalignmin : 0;
  511. localalignmax : 1;
  512. recordalignmin : 0;
  513. recordalignmax : 4;
  514. maxCrecordalign : 8
  515. );
  516. first_parm_offset : 8;
  517. stacksize : 262144;
  518. stackalign : 4;
  519. abi : abi_default;
  520. llvmdatalayout : 'todo';
  521. );
  522. system_powerpc_netbsd_info : tsysteminfo =
  523. (
  524. system : system_powerpc_netbsd;
  525. name : 'NetBSD for PowerPC';
  526. shortname : 'NetBSD';
  527. flags : [tf_under_development,tf_files_case_sensitive,tf_smartlink_library,tf_has_winlike_resources,tf_supports_hidden_symbols];
  528. cpu : cpu_powerpc;
  529. unit_env : '';
  530. extradefines : 'UNIX;BSD;HASUNIX';
  531. exeext : '';
  532. defext : '.def';
  533. scriptext : '.sh';
  534. smartext : '.sl';
  535. unitext : '.ppu';
  536. unitlibext : '.ppl';
  537. asmext : '.s';
  538. objext : '.o';
  539. resext : '.res';
  540. resobjext : '.or';
  541. sharedlibext : '.so';
  542. staticlibext : '.s';
  543. staticlibprefix : 'libp';
  544. sharedlibprefix : 'lib';
  545. sharedClibext : '.so';
  546. staticClibext : '.a';
  547. staticClibprefix : 'lib';
  548. sharedClibprefix : 'lib';
  549. importlibprefix : 'libimp';
  550. importlibext : '.a';
  551. Cprefix : '';
  552. newline : #10;
  553. dirsep : '/';
  554. assem : as_gas;
  555. assemextern : as_gas;
  556. link : ld_none;
  557. linkextern : ld_bsd;
  558. ar : ar_gnu_ar;
  559. res : res_elf;
  560. dbg : dbg_stabs;
  561. script : script_unix;
  562. endian : endian_big;
  563. alignment :
  564. (
  565. procalign : 4;
  566. loopalign : 4;
  567. jumpalign : 0;
  568. jumpalignskipmax : 0;
  569. coalescealign : 0;
  570. coalescealignskipmax: 0;
  571. constalignmin : 0;
  572. constalignmax : 4;
  573. varalignmin : 0;
  574. varalignmax : 4;
  575. localalignmin : 0;
  576. localalignmax : 4;
  577. recordalignmin : 0;
  578. recordalignmax : 2;
  579. maxCrecordalign : 4 // should be 8 probably
  580. );
  581. first_parm_offset : 8;
  582. stacksize : 32*1024*1024;
  583. stackalign : 16;
  584. { abi_powerpc_sysv doesn't work yet }
  585. abi : abi_powerpc_aix;
  586. 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';
  587. );
  588. system_x86_64_netbsd_info : tsysteminfo =
  589. (
  590. system : system_x86_64_netbsd;
  591. name : 'NetBSD for x86-64';
  592. shortname : 'NetBSD';
  593. flags : [tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_library_needs_pic,tf_needs_symbol_type,
  594. tf_files_case_sensitive, tf_under_development,
  595. tf_dwarf_only_local_labels,
  596. { tf_pic_uses_got,}tf_smartlink_sections,tf_has_winlike_resources,tf_supports_hidden_symbols];
  597. cpu : cpu_x86_64;
  598. unit_env : 'BSDUNITS';
  599. extradefines : 'UNIX;HASUNIX;BSD';
  600. exeext : '';
  601. defext : '.def';
  602. scriptext : '.sh';
  603. smartext : '.sl';
  604. unitext : '.ppu';
  605. unitlibext : '.ppl';
  606. asmext : '.s';
  607. objext : '.o';
  608. resext : '.res';
  609. resobjext : '.or';
  610. sharedlibext : '.so';
  611. staticlibext : '.a';
  612. staticlibprefix : 'libp';
  613. sharedlibprefix : 'lib';
  614. sharedClibext : '.so';
  615. staticClibext : '.a';
  616. staticClibprefix : 'lib';
  617. sharedClibprefix : 'lib';
  618. importlibprefix : 'libimp';
  619. importlibext : '.a';
  620. Cprefix : '';
  621. newline : #10;
  622. dirsep : '/';
  623. assem : as_x86_64_elf64;
  624. assemextern : as_gas;
  625. link : ld_none;
  626. linkextern : ld_bsd;
  627. ar : ar_gnu_ar;
  628. res : res_elf;
  629. dbg : dbg_dwarf2; //dbg_stabs;
  630. script : script_unix;
  631. endian : endian_little;
  632. alignment :
  633. (
  634. procalign : 8;
  635. loopalign : 4;
  636. jumpalign : 0;
  637. jumpalignskipmax : 0;
  638. coalescealign : 0;
  639. coalescealignskipmax: 0;
  640. constalignmin : 0;
  641. constalignmax : 16;
  642. varalignmin : 0;
  643. varalignmax : 16;
  644. localalignmin : 4;
  645. localalignmax : 16;
  646. recordalignmin : 0;
  647. recordalignmax : 16;
  648. maxCrecordalign : 16
  649. );
  650. first_parm_offset : 16;
  651. stacksize : 256*1024;
  652. stackalign : 16;
  653. abi : abi_default;
  654. 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';
  655. );
  656. system_arm_netbsd_info : tsysteminfo =
  657. (
  658. system : system_arm_netbsd;
  659. name : 'NetBSD for ARMHF';
  660. shortname : 'NetBSD';
  661. flags : [tf_under_development,tf_requires_proper_alignment,tf_files_case_sensitive,tf_smartlink_sections,tf_has_winlike_resources,
  662. tf_supports_hidden_symbols];
  663. cpu : cpu_arm;
  664. unit_env : '';
  665. extradefines : 'UNIX;BSD;HASUNIX';
  666. exeext : '';
  667. defext : '.def';
  668. scriptext : '.sh';
  669. smartext : '.sl';
  670. unitext : '.ppu';
  671. unitlibext : '.ppl';
  672. asmext : '.s';
  673. objext : '.o';
  674. resext : '.res';
  675. resobjext : '.or';
  676. sharedlibext : '.so';
  677. staticlibext : '.s';
  678. staticlibprefix : 'libp';
  679. sharedlibprefix : 'lib';
  680. sharedClibext : '.so';
  681. staticClibext : '.a';
  682. staticClibprefix : 'lib';
  683. sharedClibprefix : 'lib';
  684. importlibprefix : 'libimp';
  685. importlibext : '.a';
  686. Cprefix : '';
  687. newline : #10;
  688. dirsep : '/';
  689. assem : as_gas; {as_arm_elf32;}
  690. assemextern : as_gas;
  691. link : ld_none;
  692. linkextern : ld_bsd;
  693. ar : ar_gnu_ar;
  694. res : res_elf;
  695. dbg : dbg_dwarf2;
  696. script : script_unix;
  697. endian : endian_big;
  698. alignment :
  699. (
  700. procalign : 4;
  701. loopalign : 4;
  702. jumpalign : 0;
  703. jumpalignskipmax : 0;
  704. coalescealign : 0;
  705. coalescealignskipmax: 0;
  706. constalignmin : 0;
  707. constalignmax : 4;
  708. varalignmin : 0;
  709. varalignmax : 4;
  710. localalignmin : 0;
  711. localalignmax : 4;
  712. recordalignmin : 0;
  713. recordalignmax : 2;
  714. maxCrecordalign : 4 // should be 8 probably
  715. );
  716. first_parm_offset : 8;
  717. stacksize : 32*1024*1024;
  718. stackalign : 16;
  719. abi : abi_eabihf;
  720. llvmdatalayout : 'todo';
  721. );
  722. implementation
  723. initialization
  724. {$ifdef cpui386}
  725. {$ifdef FreeBSD}
  726. set_source_info(system_i386_FreeBSD_info);
  727. {$endif}
  728. {$ifdef NetBSD}
  729. set_source_info(system_i386_NetBSD_info);
  730. {$endif}
  731. {$ifdef OpenBSD}
  732. set_source_info(system_i386_OpenBSD_info);
  733. {$endif}
  734. {$endif cpui386}
  735. {$ifdef cpux86_64}
  736. {$ifdef FreeBSD}
  737. set_source_info(system_x86_64_FreeBSD_info);
  738. {$endif}
  739. {$ifdef DragonFly}
  740. set_source_info(system_x86_64_DragonFly_info);
  741. {$endif}
  742. {$ifdef OpenBSD}
  743. set_source_info(system_x86_64_OpenBSD_info);
  744. {$endif}
  745. {$ifdef NetBSD}
  746. set_source_info(system_x86_64_NetBSD_info);
  747. {$endif}
  748. {$endif}
  749. {$ifdef cpu68}
  750. {$ifdef NetBSD}
  751. set_source_info(system_m68k_NetBSD_info);
  752. {$endif NetBSD}
  753. {$endif cpu68}
  754. {$ifdef cpupowerpc32}
  755. {$ifdef NetBSD}
  756. set_source_info(system_powerpc_netbsd_info);
  757. {$endif}
  758. {$endif cpupowerpc32}
  759. {$ifdef cpuarm}
  760. {$ifdef NetBSD}
  761. set_source_info(system_arm_netbsd_info);
  762. {$endif}
  763. {$endif cpuarm}
  764. end.