i_bsd.pas 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850
  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. { tf_pic_uses_got,}tf_smartlink_sections,tf_has_winlike_resources,tf_supports_hidden_symbols];
  452. cpu : cpu_x86_64;
  453. unit_env : 'BSDUNITS';
  454. extradefines : 'UNIX;HASUNIX;BSD';
  455. exeext : '';
  456. defext : '.def';
  457. scriptext : '.sh';
  458. smartext : '.sl';
  459. unitext : '.ppu';
  460. unitlibext : '.ppl';
  461. asmext : '.s';
  462. objext : '.o';
  463. resext : '.res';
  464. resobjext : '.or';
  465. sharedlibext : '.so';
  466. staticlibext : '.a';
  467. staticlibprefix : 'libp';
  468. sharedlibprefix : 'lib';
  469. sharedClibext : '.so';
  470. staticClibext : '.a';
  471. staticClibprefix : 'lib';
  472. sharedClibprefix : 'lib';
  473. importlibprefix : 'libimp';
  474. importlibext : '.a';
  475. Cprefix : '';
  476. newline : #10;
  477. dirsep : '/';
  478. assem : as_x86_64_elf64;
  479. assemextern : as_gas;
  480. link : ld_none;
  481. linkextern : ld_bsd;
  482. ar : ar_gnu_ar;
  483. res : res_elf;
  484. dbg : dbg_dwarf2; //dbg_stabs;
  485. script : script_unix;
  486. endian : endian_little;
  487. alignment :
  488. (
  489. procalign : 8;
  490. loopalign : 4;
  491. jumpalign : 0;
  492. jumpalignskipmax : 0;
  493. coalescealign : 0;
  494. coalescealignskipmax: 0;
  495. constalignmin : 0;
  496. constalignmax : 16;
  497. varalignmin : 0;
  498. varalignmax : 16;
  499. localalignmin : 4;
  500. localalignmax : 16;
  501. recordalignmin : 0;
  502. recordalignmax : 16;
  503. maxCrecordalign : 16
  504. );
  505. first_parm_offset : 16;
  506. stacksize : 256*1024;
  507. stackalign : 16;
  508. abi : abi_default;
  509. 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';
  510. );
  511. system_m68k_netbsd_info : tsysteminfo =
  512. (
  513. system : system_m68k_NetBSD;
  514. name : 'NetBSD for m68k';
  515. shortname : 'NetBSD';
  516. flags : [tf_under_development,tf_needs_symbol_size,tf_needs_symbol_type,tf_requires_proper_alignment,
  517. tf_files_case_sensitive,tf_smartlink_sections,tf_has_winlike_resources,tf_supports_hidden_symbols];
  518. cpu : cpu_m68k;
  519. unit_env : 'BSDUNITS';
  520. extradefines : 'UNIX;BSD;HASUNIX';
  521. exeext : '';
  522. defext : '.def';
  523. scriptext : '.sh';
  524. smartext : '.sl';
  525. unitext : '.ppu';
  526. unitlibext : '.ppl';
  527. asmext : '.s';
  528. objext : '.o';
  529. resext : '.res';
  530. resobjext : '.or';
  531. sharedlibext : '.so';
  532. staticlibext : '.a';
  533. staticlibprefix : 'libp';
  534. sharedlibprefix : 'lib';
  535. sharedClibext : '.so';
  536. staticClibext : '.a';
  537. staticClibprefix : 'lib';
  538. sharedClibprefix : 'lib';
  539. importlibprefix : 'libimp';
  540. importlibext : '.a';
  541. Cprefix : '';
  542. newline : #10;
  543. dirsep : '/';
  544. assem : as_gas;
  545. assemextern : as_gas;
  546. link : ld_none;
  547. linkextern : ld_bsd;
  548. ar : ar_gnu_ar;
  549. res : res_elf;
  550. dbg : dbg_stabs;
  551. script : script_unix;
  552. endian : endian_big;
  553. alignment :
  554. (
  555. procalign : 4;
  556. loopalign : 4;
  557. jumpalign : 0;
  558. jumpalignskipmax : 0;
  559. coalescealign : 0;
  560. coalescealignskipmax: 0;
  561. constalignmin : 0;
  562. constalignmax : 1;
  563. varalignmin : 0;
  564. varalignmax : 1;
  565. localalignmin : 0;
  566. localalignmax : 1;
  567. recordalignmin : 0;
  568. recordalignmax : 4;
  569. maxCrecordalign : 8
  570. );
  571. first_parm_offset : 8;
  572. stacksize : 262144;
  573. stackalign : 4;
  574. abi : abi_default;
  575. llvmdatalayout : 'todo';
  576. );
  577. system_powerpc_netbsd_info : tsysteminfo =
  578. (
  579. system : system_powerpc_netbsd;
  580. name : 'NetBSD for PowerPC';
  581. shortname : 'NetBSD';
  582. flags : [tf_under_development,tf_files_case_sensitive,tf_smartlink_library,tf_has_winlike_resources,tf_supports_hidden_symbols];
  583. cpu : cpu_powerpc;
  584. unit_env : '';
  585. extradefines : 'UNIX;BSD;HASUNIX';
  586. exeext : '';
  587. defext : '.def';
  588. scriptext : '.sh';
  589. smartext : '.sl';
  590. unitext : '.ppu';
  591. unitlibext : '.ppl';
  592. asmext : '.s';
  593. objext : '.o';
  594. resext : '.res';
  595. resobjext : '.or';
  596. sharedlibext : '.so';
  597. staticlibext : '.s';
  598. staticlibprefix : 'libp';
  599. sharedlibprefix : 'lib';
  600. sharedClibext : '.so';
  601. staticClibext : '.a';
  602. staticClibprefix : 'lib';
  603. sharedClibprefix : 'lib';
  604. importlibprefix : 'libimp';
  605. importlibext : '.a';
  606. Cprefix : '';
  607. newline : #10;
  608. dirsep : '/';
  609. assem : as_gas;
  610. assemextern : as_gas;
  611. link : ld_none;
  612. linkextern : ld_bsd;
  613. ar : ar_gnu_ar;
  614. res : res_elf;
  615. dbg : dbg_stabs;
  616. script : script_unix;
  617. endian : endian_big;
  618. alignment :
  619. (
  620. procalign : 4;
  621. loopalign : 4;
  622. jumpalign : 0;
  623. jumpalignskipmax : 0;
  624. coalescealign : 0;
  625. coalescealignskipmax: 0;
  626. constalignmin : 0;
  627. constalignmax : 4;
  628. varalignmin : 0;
  629. varalignmax : 4;
  630. localalignmin : 0;
  631. localalignmax : 4;
  632. recordalignmin : 0;
  633. recordalignmax : 2;
  634. maxCrecordalign : 4 // should be 8 probably
  635. );
  636. first_parm_offset : 8;
  637. stacksize : 32*1024*1024;
  638. stackalign : 16;
  639. { abi_powerpc_sysv doesn't work yet }
  640. abi : abi_powerpc_aix;
  641. 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';
  642. );
  643. system_x86_64_netbsd_info : tsysteminfo =
  644. (
  645. system : system_x86_64_netbsd;
  646. name : 'NetBSD for x86-64';
  647. shortname : 'NetBSD';
  648. flags : [tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_library_needs_pic,tf_needs_symbol_type,
  649. tf_files_case_sensitive, tf_under_development,
  650. tf_dwarf_only_local_labels,
  651. { tf_pic_uses_got,}tf_smartlink_sections,tf_has_winlike_resources,tf_supports_hidden_symbols];
  652. cpu : cpu_x86_64;
  653. unit_env : 'BSDUNITS';
  654. extradefines : 'UNIX;HASUNIX;BSD';
  655. exeext : '';
  656. defext : '.def';
  657. scriptext : '.sh';
  658. smartext : '.sl';
  659. unitext : '.ppu';
  660. unitlibext : '.ppl';
  661. asmext : '.s';
  662. objext : '.o';
  663. resext : '.res';
  664. resobjext : '.or';
  665. sharedlibext : '.so';
  666. staticlibext : '.a';
  667. staticlibprefix : 'libp';
  668. sharedlibprefix : 'lib';
  669. sharedClibext : '.so';
  670. staticClibext : '.a';
  671. staticClibprefix : 'lib';
  672. sharedClibprefix : 'lib';
  673. importlibprefix : 'libimp';
  674. importlibext : '.a';
  675. Cprefix : '';
  676. newline : #10;
  677. dirsep : '/';
  678. assem : as_x86_64_elf64;
  679. assemextern : as_gas;
  680. link : ld_none;
  681. linkextern : ld_bsd;
  682. ar : ar_gnu_ar;
  683. res : res_elf;
  684. dbg : dbg_dwarf2; //dbg_stabs;
  685. script : script_unix;
  686. endian : endian_little;
  687. alignment :
  688. (
  689. procalign : 8;
  690. loopalign : 4;
  691. jumpalign : 0;
  692. jumpalignskipmax : 0;
  693. coalescealign : 0;
  694. coalescealignskipmax: 0;
  695. constalignmin : 0;
  696. constalignmax : 16;
  697. varalignmin : 0;
  698. varalignmax : 16;
  699. localalignmin : 4;
  700. localalignmax : 16;
  701. recordalignmin : 0;
  702. recordalignmax : 16;
  703. maxCrecordalign : 16
  704. );
  705. first_parm_offset : 16;
  706. stacksize : 256*1024;
  707. stackalign : 16;
  708. abi : abi_default;
  709. 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';
  710. );
  711. system_arm_netbsd_info : tsysteminfo =
  712. (
  713. system : system_arm_netbsd;
  714. name : 'NetBSD for ARMHF';
  715. shortname : 'NetBSD';
  716. flags : [tf_under_development,tf_requires_proper_alignment,tf_files_case_sensitive,tf_smartlink_sections,tf_has_winlike_resources,
  717. tf_supports_hidden_symbols];
  718. cpu : cpu_arm;
  719. unit_env : '';
  720. extradefines : 'UNIX;BSD;HASUNIX';
  721. exeext : '';
  722. defext : '.def';
  723. scriptext : '.sh';
  724. smartext : '.sl';
  725. unitext : '.ppu';
  726. unitlibext : '.ppl';
  727. asmext : '.s';
  728. objext : '.o';
  729. resext : '.res';
  730. resobjext : '.or';
  731. sharedlibext : '.so';
  732. staticlibext : '.s';
  733. staticlibprefix : 'libp';
  734. sharedlibprefix : 'lib';
  735. sharedClibext : '.so';
  736. staticClibext : '.a';
  737. staticClibprefix : 'lib';
  738. sharedClibprefix : 'lib';
  739. importlibprefix : 'libimp';
  740. importlibext : '.a';
  741. Cprefix : '';
  742. newline : #10;
  743. dirsep : '/';
  744. assem : as_gas; {as_arm_elf32;}
  745. assemextern : as_gas;
  746. link : ld_none;
  747. linkextern : ld_bsd;
  748. ar : ar_gnu_ar;
  749. res : res_elf;
  750. dbg : dbg_dwarf2;
  751. script : script_unix;
  752. endian : endian_big;
  753. alignment :
  754. (
  755. procalign : 4;
  756. loopalign : 4;
  757. jumpalign : 0;
  758. jumpalignskipmax : 0;
  759. coalescealign : 0;
  760. coalescealignskipmax: 0;
  761. constalignmin : 0;
  762. constalignmax : 4;
  763. varalignmin : 0;
  764. varalignmax : 4;
  765. localalignmin : 0;
  766. localalignmax : 4;
  767. recordalignmin : 0;
  768. recordalignmax : 2;
  769. maxCrecordalign : 4 // should be 8 probably
  770. );
  771. first_parm_offset : 8;
  772. stacksize : 32*1024*1024;
  773. stackalign : 16;
  774. abi : abi_eabihf;
  775. llvmdatalayout : 'todo';
  776. );
  777. implementation
  778. initialization
  779. {$ifdef cpuaarch64}
  780. {$ifdef FreeBSD}
  781. set_source_info(system_aarch64_freebsd_info);
  782. {$endif FreeBSD}
  783. {$endif cpuaarch64}
  784. {$ifdef cpui386}
  785. {$ifdef FreeBSD}
  786. set_source_info(system_i386_FreeBSD_info);
  787. {$endif}
  788. {$ifdef NetBSD}
  789. set_source_info(system_i386_NetBSD_info);
  790. {$endif}
  791. {$ifdef OpenBSD}
  792. set_source_info(system_i386_OpenBSD_info);
  793. {$endif}
  794. {$endif cpui386}
  795. {$ifdef cpux86_64}
  796. {$ifdef FreeBSD}
  797. set_source_info(system_x86_64_FreeBSD_info);
  798. {$endif}
  799. {$ifdef DragonFly}
  800. set_source_info(system_x86_64_DragonFly_info);
  801. {$endif}
  802. {$ifdef OpenBSD}
  803. set_source_info(system_x86_64_OpenBSD_info);
  804. {$endif}
  805. {$ifdef NetBSD}
  806. set_source_info(system_x86_64_NetBSD_info);
  807. {$endif}
  808. {$endif}
  809. {$ifdef cpu68}
  810. {$ifdef NetBSD}
  811. set_source_info(system_m68k_NetBSD_info);
  812. {$endif NetBSD}
  813. {$endif cpu68}
  814. {$ifdef cpupowerpc32}
  815. {$ifdef NetBSD}
  816. set_source_info(system_powerpc_netbsd_info);
  817. {$endif}
  818. {$endif cpupowerpc32}
  819. {$ifdef cpuarm}
  820. {$ifdef NetBSD}
  821. set_source_info(system_arm_netbsd_info);
  822. {$endif}
  823. {$endif cpuarm}
  824. end.