i_bsd.pas 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853
  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_x86_64_freebsd_info : tsysteminfo =
  175. (
  176. system : system_x86_64_freebsd;
  177. name : 'FreeBSD for x86-64';
  178. shortname : 'FreeBSD';
  179. flags : [tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_library_needs_pic,tf_needs_symbol_type,
  180. tf_files_case_sensitive,
  181. tf_dwarf_only_local_labels,
  182. {tf_pic_uses_got,}tf_smartlink_sections,tf_has_winlike_resources,tf_supports_hidden_symbols];
  183. cpu : cpu_x86_64;
  184. unit_env : 'BSDUNITS';
  185. extradefines : 'UNIX;HASUNIX;BSD';
  186. exeext : '';
  187. defext : '.def';
  188. scriptext : '.sh';
  189. smartext : '.sl';
  190. unitext : '.ppu';
  191. unitlibext : '.ppl';
  192. asmext : '.s';
  193. objext : '.o';
  194. resext : '.res';
  195. resobjext : '.or';
  196. sharedlibext : '.so';
  197. staticlibext : '.a';
  198. staticlibprefix : 'libp';
  199. sharedlibprefix : 'lib';
  200. sharedClibext : '.so';
  201. staticClibext : '.a';
  202. staticClibprefix : 'lib';
  203. sharedClibprefix : 'lib';
  204. importlibprefix : 'libimp';
  205. importlibext : '.a';
  206. Cprefix : '';
  207. newline : #10;
  208. dirsep : '/';
  209. assem : as_x86_64_elf64;
  210. assemextern : as_gas;
  211. link : ld_none;
  212. linkextern : ld_bsd;
  213. ar : ar_gnu_ar;
  214. res : res_elf;
  215. dbg : dbg_dwarf2; //dbg_stabs;
  216. script : script_unix;
  217. endian : endian_little;
  218. alignment :
  219. (
  220. procalign : 8;
  221. loopalign : 4;
  222. jumpalign : 0;
  223. jumpalignskipmax : 0;
  224. coalescealign : 0;
  225. coalescealignskipmax: 0;
  226. constalignmin : 0;
  227. constalignmax : 16;
  228. varalignmin : 0;
  229. varalignmax : 16;
  230. localalignmin : 4;
  231. localalignmax : 16;
  232. recordalignmin : 0;
  233. recordalignmax : 16;
  234. maxCrecordalign : 16
  235. );
  236. first_parm_offset : 16;
  237. stacksize : 256*1024;
  238. stackalign : 16;
  239. abi : abi_default;
  240. 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';
  241. );
  242. system_x86_64_dragonfly_info : tsysteminfo =
  243. (
  244. system : system_x86_64_dragonfly;
  245. name : 'DragonFly for x86-64';
  246. shortname : 'DragonFly';
  247. flags : [tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_library_needs_pic,tf_needs_symbol_type,
  248. tf_files_case_sensitive,
  249. tf_dwarf_only_local_labels,
  250. {tf_pic_uses_got,}tf_smartlink_sections,tf_has_winlike_resources,tf_supports_hidden_symbols];
  251. cpu : cpu_x86_64;
  252. unit_env : 'BSDUNITS';
  253. extradefines : 'UNIX;HASUNIX;BSD';
  254. exeext : '';
  255. defext : '.def';
  256. scriptext : '.sh';
  257. smartext : '.sl';
  258. unitext : '.ppu';
  259. unitlibext : '.ppl';
  260. asmext : '.s';
  261. objext : '.o';
  262. resext : '.res';
  263. resobjext : '.or';
  264. sharedlibext : '.so';
  265. staticlibext : '.a';
  266. staticlibprefix : 'libp';
  267. sharedlibprefix : 'lib';
  268. sharedClibext : '.so';
  269. staticClibext : '.a';
  270. staticClibprefix : 'lib';
  271. sharedClibprefix : 'lib';
  272. importlibprefix : 'libimp';
  273. importlibext : '.a';
  274. Cprefix : '';
  275. newline : #10;
  276. dirsep : '/';
  277. assem : as_x86_64_elf64;
  278. assemextern : as_gas;
  279. link : ld_none;
  280. linkextern : ld_bsd;
  281. ar : ar_gnu_ar;
  282. res : res_elf;
  283. dbg : dbg_dwarf2; //dbg_stabs;
  284. script : script_unix;
  285. endian : endian_little;
  286. alignment :
  287. (
  288. procalign : 8;
  289. loopalign : 4;
  290. jumpalign : 0;
  291. jumpalignskipmax : 0;
  292. coalescealign : 0;
  293. coalescealignskipmax: 0;
  294. constalignmin : 0;
  295. constalignmax : 16;
  296. varalignmin : 0;
  297. varalignmax : 16;
  298. localalignmin : 4;
  299. localalignmax : 16;
  300. recordalignmin : 0;
  301. recordalignmax : 16;
  302. maxCrecordalign : 16
  303. );
  304. first_parm_offset : 16;
  305. stacksize : 256*1024;
  306. stackalign : 16;
  307. abi : abi_default;
  308. 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';
  309. );
  310. system_i386_netbsd_info : tsysteminfo =
  311. (
  312. system : system_i386_NetBSD;
  313. name : 'NetBSD for i386';
  314. shortname : 'NetBSD';
  315. flags : [tf_pic_uses_got,tf_under_development,tf_files_case_sensitive,tf_smartlink_library,tf_has_winlike_resources,
  316. tf_supports_hidden_symbols];
  317. cpu : cpu_i386;
  318. unit_env : 'BSDUNITS';
  319. extradefines : 'UNIX;BSD;HASUNIX';
  320. exeext : '';
  321. defext : '.def';
  322. scriptext : '.sh';
  323. smartext : '.sl';
  324. unitext : '.ppu';
  325. unitlibext : '.ppl';
  326. asmext : '.s';
  327. objext : '.o';
  328. resext : '.res';
  329. resobjext : '.or';
  330. sharedlibext : '.so';
  331. staticlibext : '.a';
  332. staticlibprefix : 'libp';
  333. sharedlibprefix : 'lib';
  334. sharedClibext : '.so';
  335. staticClibext : '.a';
  336. staticClibprefix : 'lib';
  337. sharedClibprefix : 'lib';
  338. importlibprefix : 'libimp';
  339. importlibext : '.a';
  340. Cprefix : '';
  341. newline : #10;
  342. dirsep : '/';
  343. assem : as_i386_elf32;
  344. assemextern : as_gas;
  345. link : ld_none;
  346. linkextern : ld_bsd;
  347. ar : ar_gnu_ar;
  348. res : res_elf;
  349. dbg : dbg_stabs;
  350. script : script_unix;
  351. endian : endian_little;
  352. alignment :
  353. (
  354. procalign : 16;
  355. loopalign : 4;
  356. jumpalign : 0;
  357. jumpalignskipmax : 0;
  358. coalescealign : 0;
  359. coalescealignskipmax: 0;
  360. constalignmin : 0;
  361. constalignmax : 16;
  362. varalignmin : 0;
  363. varalignmax : 16;
  364. localalignmin : 4;
  365. localalignmax : 8;
  366. recordalignmin : 0;
  367. recordalignmax : 16;
  368. maxCrecordalign : 4
  369. );
  370. first_parm_offset : 8;
  371. stacksize : 262144;
  372. stackalign : 4;
  373. abi : abi_default;
  374. 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';
  375. );
  376. system_i386_openbsd_info : tsysteminfo =
  377. (
  378. system : system_i386_OpenBSD;
  379. name : 'OpenBSD for i386';
  380. shortname : 'OpenBSD';
  381. flags : [tf_pic_default,tf_pic_uses_got,tf_under_development,tf_files_case_sensitive,tf_smartlink_sections,tf_has_winlike_resources,
  382. tf_supports_hidden_symbols];
  383. cpu : cpu_i386;
  384. unit_env : 'BSDUNITS';
  385. extradefines : 'UNIX;BSD;HASUNIX';
  386. exeext : '';
  387. defext : '.def';
  388. scriptext : '.sh';
  389. smartext : '.sl';
  390. unitext : '.ppu';
  391. unitlibext : '.ppl';
  392. asmext : '.s';
  393. objext : '.o';
  394. resext : '.res';
  395. resobjext : '.or';
  396. sharedlibext : '.so';
  397. staticlibext : '.a';
  398. staticlibprefix : 'libp';
  399. sharedlibprefix : 'lib';
  400. sharedClibext : '.so';
  401. staticClibext : '.a';
  402. staticClibprefix : 'lib';
  403. sharedClibprefix : 'lib';
  404. importlibprefix : 'libimp';
  405. importlibext : '.a';
  406. Cprefix : '';
  407. newline : #10;
  408. dirsep : '/';
  409. assem : as_gas;
  410. assemextern : as_gas;
  411. link : ld_none;
  412. linkextern : ld_bsd;
  413. ar : ar_gnu_ar;
  414. res : res_elf;
  415. dbg : dbg_stabs;
  416. script : script_unix;
  417. endian : endian_little;
  418. alignment :
  419. (
  420. procalign : 16;
  421. loopalign : 4;
  422. jumpalign : 0;
  423. jumpalignskipmax : 0;
  424. coalescealign : 0;
  425. coalescealignskipmax: 0;
  426. constalignmin : 0;
  427. constalignmax : 16;
  428. varalignmin : 0;
  429. varalignmax : 16;
  430. localalignmin : 4;
  431. localalignmax : 8;
  432. recordalignmin : 0;
  433. recordalignmax : 16;
  434. maxCrecordalign : 4
  435. );
  436. first_parm_offset : 8;
  437. stacksize : 262144;
  438. stackalign : 4;
  439. abi : abi_default;
  440. { note: default LLVM stack alignment is 16 bytes for this target }
  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_x86_64_openbsd_info : tsysteminfo =
  444. (
  445. system : system_x86_64_openbsd;
  446. name : 'OpenBSD for x86-64';
  447. shortname : 'OpenBSD';
  448. flags : [tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_library_needs_pic,tf_needs_symbol_type,
  449. tf_files_case_sensitive, tf_under_development,
  450. tf_dwarf_only_local_labels, tf_pic_default,
  451. {$ifdef llvm}
  452. tf_use_psabieh,
  453. {$endif llvm}
  454. { tf_pic_uses_got,}tf_smartlink_sections,tf_has_winlike_resources,tf_supports_hidden_symbols];
  455. cpu : cpu_x86_64;
  456. unit_env : 'BSDUNITS';
  457. extradefines : 'UNIX;HASUNIX;BSD';
  458. exeext : '';
  459. defext : '.def';
  460. scriptext : '.sh';
  461. smartext : '.sl';
  462. unitext : '.ppu';
  463. unitlibext : '.ppl';
  464. asmext : '.s';
  465. objext : '.o';
  466. resext : '.res';
  467. resobjext : '.or';
  468. sharedlibext : '.so';
  469. staticlibext : '.a';
  470. staticlibprefix : 'libp';
  471. sharedlibprefix : 'lib';
  472. sharedClibext : '.so';
  473. staticClibext : '.a';
  474. staticClibprefix : 'lib';
  475. sharedClibprefix : 'lib';
  476. importlibprefix : 'libimp';
  477. importlibext : '.a';
  478. Cprefix : '';
  479. newline : #10;
  480. dirsep : '/';
  481. assem : as_x86_64_elf64;
  482. assemextern : as_gas;
  483. link : ld_none;
  484. linkextern : ld_bsd;
  485. ar : ar_gnu_ar;
  486. res : res_elf;
  487. dbg : dbg_dwarf2; //dbg_stabs;
  488. script : script_unix;
  489. endian : endian_little;
  490. alignment :
  491. (
  492. procalign : 8;
  493. loopalign : 4;
  494. jumpalign : 0;
  495. jumpalignskipmax : 0;
  496. coalescealign : 0;
  497. coalescealignskipmax: 0;
  498. constalignmin : 0;
  499. constalignmax : 16;
  500. varalignmin : 0;
  501. varalignmax : 16;
  502. localalignmin : 4;
  503. localalignmax : 16;
  504. recordalignmin : 0;
  505. recordalignmax : 16;
  506. maxCrecordalign : 16
  507. );
  508. first_parm_offset : 16;
  509. stacksize : 256*1024;
  510. stackalign : 16;
  511. abi : abi_default;
  512. 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';
  513. );
  514. system_m68k_netbsd_info : tsysteminfo =
  515. (
  516. system : system_m68k_NetBSD;
  517. name : 'NetBSD for m68k';
  518. shortname : 'NetBSD';
  519. flags : [tf_under_development,tf_needs_symbol_size,tf_needs_symbol_type,tf_requires_proper_alignment,
  520. tf_files_case_sensitive,tf_smartlink_sections,tf_has_winlike_resources,tf_supports_hidden_symbols];
  521. cpu : cpu_m68k;
  522. unit_env : 'BSDUNITS';
  523. extradefines : 'UNIX;BSD;HASUNIX';
  524. exeext : '';
  525. defext : '.def';
  526. scriptext : '.sh';
  527. smartext : '.sl';
  528. unitext : '.ppu';
  529. unitlibext : '.ppl';
  530. asmext : '.s';
  531. objext : '.o';
  532. resext : '.res';
  533. resobjext : '.or';
  534. sharedlibext : '.so';
  535. staticlibext : '.a';
  536. staticlibprefix : 'libp';
  537. sharedlibprefix : 'lib';
  538. sharedClibext : '.so';
  539. staticClibext : '.a';
  540. staticClibprefix : 'lib';
  541. sharedClibprefix : 'lib';
  542. importlibprefix : 'libimp';
  543. importlibext : '.a';
  544. Cprefix : '';
  545. newline : #10;
  546. dirsep : '/';
  547. assem : as_gas;
  548. assemextern : as_gas;
  549. link : ld_none;
  550. linkextern : ld_bsd;
  551. ar : ar_gnu_ar;
  552. res : res_elf;
  553. dbg : dbg_stabs;
  554. script : script_unix;
  555. endian : endian_big;
  556. alignment :
  557. (
  558. procalign : 4;
  559. loopalign : 4;
  560. jumpalign : 0;
  561. jumpalignskipmax : 0;
  562. coalescealign : 0;
  563. coalescealignskipmax: 0;
  564. constalignmin : 0;
  565. constalignmax : 1;
  566. varalignmin : 0;
  567. varalignmax : 1;
  568. localalignmin : 0;
  569. localalignmax : 1;
  570. recordalignmin : 0;
  571. recordalignmax : 4;
  572. maxCrecordalign : 8
  573. );
  574. first_parm_offset : 8;
  575. stacksize : 262144;
  576. stackalign : 4;
  577. abi : abi_default;
  578. llvmdatalayout : 'todo';
  579. );
  580. system_powerpc_netbsd_info : tsysteminfo =
  581. (
  582. system : system_powerpc_netbsd;
  583. name : 'NetBSD for PowerPC';
  584. shortname : 'NetBSD';
  585. flags : [tf_under_development,tf_files_case_sensitive,tf_smartlink_library,tf_has_winlike_resources,tf_supports_hidden_symbols];
  586. cpu : cpu_powerpc;
  587. unit_env : '';
  588. extradefines : 'UNIX;BSD;HASUNIX';
  589. exeext : '';
  590. defext : '.def';
  591. scriptext : '.sh';
  592. smartext : '.sl';
  593. unitext : '.ppu';
  594. unitlibext : '.ppl';
  595. asmext : '.s';
  596. objext : '.o';
  597. resext : '.res';
  598. resobjext : '.or';
  599. sharedlibext : '.so';
  600. staticlibext : '.s';
  601. staticlibprefix : 'libp';
  602. sharedlibprefix : 'lib';
  603. sharedClibext : '.so';
  604. staticClibext : '.a';
  605. staticClibprefix : 'lib';
  606. sharedClibprefix : 'lib';
  607. importlibprefix : 'libimp';
  608. importlibext : '.a';
  609. Cprefix : '';
  610. newline : #10;
  611. dirsep : '/';
  612. assem : as_gas;
  613. assemextern : as_gas;
  614. link : ld_none;
  615. linkextern : ld_bsd;
  616. ar : ar_gnu_ar;
  617. res : res_elf;
  618. dbg : dbg_stabs;
  619. script : script_unix;
  620. endian : endian_big;
  621. alignment :
  622. (
  623. procalign : 4;
  624. loopalign : 4;
  625. jumpalign : 0;
  626. jumpalignskipmax : 0;
  627. coalescealign : 0;
  628. coalescealignskipmax: 0;
  629. constalignmin : 0;
  630. constalignmax : 4;
  631. varalignmin : 0;
  632. varalignmax : 4;
  633. localalignmin : 0;
  634. localalignmax : 4;
  635. recordalignmin : 0;
  636. recordalignmax : 2;
  637. maxCrecordalign : 4 // should be 8 probably
  638. );
  639. first_parm_offset : 8;
  640. stacksize : 32*1024*1024;
  641. stackalign : 16;
  642. { abi_powerpc_sysv doesn't work yet }
  643. abi : abi_powerpc_aix;
  644. 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';
  645. );
  646. system_x86_64_netbsd_info : tsysteminfo =
  647. (
  648. system : system_x86_64_netbsd;
  649. name : 'NetBSD for x86-64';
  650. shortname : 'NetBSD';
  651. flags : [tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_library_needs_pic,tf_needs_symbol_type,
  652. tf_files_case_sensitive, tf_under_development,
  653. tf_dwarf_only_local_labels,
  654. { tf_pic_uses_got,}tf_smartlink_sections,tf_has_winlike_resources,tf_supports_hidden_symbols];
  655. cpu : cpu_x86_64;
  656. unit_env : 'BSDUNITS';
  657. extradefines : 'UNIX;HASUNIX;BSD';
  658. exeext : '';
  659. defext : '.def';
  660. scriptext : '.sh';
  661. smartext : '.sl';
  662. unitext : '.ppu';
  663. unitlibext : '.ppl';
  664. asmext : '.s';
  665. objext : '.o';
  666. resext : '.res';
  667. resobjext : '.or';
  668. sharedlibext : '.so';
  669. staticlibext : '.a';
  670. staticlibprefix : 'libp';
  671. sharedlibprefix : 'lib';
  672. sharedClibext : '.so';
  673. staticClibext : '.a';
  674. staticClibprefix : 'lib';
  675. sharedClibprefix : 'lib';
  676. importlibprefix : 'libimp';
  677. importlibext : '.a';
  678. Cprefix : '';
  679. newline : #10;
  680. dirsep : '/';
  681. assem : as_x86_64_elf64;
  682. assemextern : as_gas;
  683. link : ld_none;
  684. linkextern : ld_bsd;
  685. ar : ar_gnu_ar;
  686. res : res_elf;
  687. dbg : dbg_dwarf2; //dbg_stabs;
  688. script : script_unix;
  689. endian : endian_little;
  690. alignment :
  691. (
  692. procalign : 8;
  693. loopalign : 4;
  694. jumpalign : 0;
  695. jumpalignskipmax : 0;
  696. coalescealign : 0;
  697. coalescealignskipmax: 0;
  698. constalignmin : 0;
  699. constalignmax : 16;
  700. varalignmin : 0;
  701. varalignmax : 16;
  702. localalignmin : 4;
  703. localalignmax : 16;
  704. recordalignmin : 0;
  705. recordalignmax : 16;
  706. maxCrecordalign : 16
  707. );
  708. first_parm_offset : 16;
  709. stacksize : 256*1024;
  710. stackalign : 16;
  711. abi : abi_default;
  712. 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';
  713. );
  714. system_arm_netbsd_info : tsysteminfo =
  715. (
  716. system : system_arm_netbsd;
  717. name : 'NetBSD for ARMHF';
  718. shortname : 'NetBSD';
  719. flags : [tf_under_development,tf_requires_proper_alignment,tf_files_case_sensitive,tf_smartlink_sections,tf_has_winlike_resources,
  720. tf_supports_hidden_symbols];
  721. cpu : cpu_arm;
  722. unit_env : '';
  723. extradefines : 'UNIX;BSD;HASUNIX';
  724. exeext : '';
  725. defext : '.def';
  726. scriptext : '.sh';
  727. smartext : '.sl';
  728. unitext : '.ppu';
  729. unitlibext : '.ppl';
  730. asmext : '.s';
  731. objext : '.o';
  732. resext : '.res';
  733. resobjext : '.or';
  734. sharedlibext : '.so';
  735. staticlibext : '.s';
  736. staticlibprefix : 'libp';
  737. sharedlibprefix : 'lib';
  738. sharedClibext : '.so';
  739. staticClibext : '.a';
  740. staticClibprefix : 'lib';
  741. sharedClibprefix : 'lib';
  742. importlibprefix : 'libimp';
  743. importlibext : '.a';
  744. Cprefix : '';
  745. newline : #10;
  746. dirsep : '/';
  747. assem : as_gas; {as_arm_elf32;}
  748. assemextern : as_gas;
  749. link : ld_none;
  750. linkextern : ld_bsd;
  751. ar : ar_gnu_ar;
  752. res : res_elf;
  753. dbg : dbg_dwarf2;
  754. script : script_unix;
  755. endian : endian_big;
  756. alignment :
  757. (
  758. procalign : 4;
  759. loopalign : 4;
  760. jumpalign : 0;
  761. jumpalignskipmax : 0;
  762. coalescealign : 0;
  763. coalescealignskipmax: 0;
  764. constalignmin : 0;
  765. constalignmax : 4;
  766. varalignmin : 0;
  767. varalignmax : 4;
  768. localalignmin : 0;
  769. localalignmax : 4;
  770. recordalignmin : 0;
  771. recordalignmax : 2;
  772. maxCrecordalign : 4 // should be 8 probably
  773. );
  774. first_parm_offset : 8;
  775. stacksize : 32*1024*1024;
  776. stackalign : 16;
  777. abi : abi_eabihf;
  778. llvmdatalayout : 'todo';
  779. );
  780. implementation
  781. initialization
  782. {$ifdef cpuaarch64}
  783. {$ifdef FreeBSD}
  784. set_source_info(system_aarch64_freebsd_info);
  785. {$endif FreeBSD}
  786. {$endif cpuaarch64}
  787. {$ifdef cpui386}
  788. {$ifdef FreeBSD}
  789. set_source_info(system_i386_FreeBSD_info);
  790. {$endif}
  791. {$ifdef NetBSD}
  792. set_source_info(system_i386_NetBSD_info);
  793. {$endif}
  794. {$ifdef OpenBSD}
  795. set_source_info(system_i386_OpenBSD_info);
  796. {$endif}
  797. {$endif cpui386}
  798. {$ifdef cpux86_64}
  799. {$ifdef FreeBSD}
  800. set_source_info(system_x86_64_FreeBSD_info);
  801. {$endif}
  802. {$ifdef DragonFly}
  803. set_source_info(system_x86_64_DragonFly_info);
  804. {$endif}
  805. {$ifdef OpenBSD}
  806. set_source_info(system_x86_64_OpenBSD_info);
  807. {$endif}
  808. {$ifdef NetBSD}
  809. set_source_info(system_x86_64_NetBSD_info);
  810. {$endif}
  811. {$endif}
  812. {$ifdef cpu68}
  813. {$ifdef NetBSD}
  814. set_source_info(system_m68k_NetBSD_info);
  815. {$endif NetBSD}
  816. {$endif cpu68}
  817. {$ifdef cpupowerpc32}
  818. {$ifdef NetBSD}
  819. set_source_info(system_powerpc_netbsd_info);
  820. {$endif}
  821. {$endif cpupowerpc32}
  822. {$ifdef cpuarm}
  823. {$ifdef NetBSD}
  824. set_source_info(system_arm_netbsd_info);
  825. {$endif}
  826. {$endif cpuarm}
  827. end.