i_bsd.pas 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by Peter Vreman
  4. This unit implements support information structures for FreeBSD/NetBSD
  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. interface
  23. uses
  24. systems;
  25. const
  26. system_i386_freebsd_info : tsysteminfo =
  27. (
  28. system : system_i386_FreeBSD;
  29. name : 'FreeBSD/ELF for i386';
  30. shortname : 'FreeBSD';
  31. flags : [tf_pic_uses_got];
  32. cpu : cpu_i386;
  33. unit_env : 'BSDUNITS';
  34. extradefines : 'UNIX;BSD;HASUNIX';
  35. exeext : '';
  36. defext : '.def';
  37. scriptext : '.sh';
  38. smartext : '.sl';
  39. unitext : '.ppu';
  40. unitlibext : '.ppl';
  41. asmext : '.s';
  42. objext : '.o';
  43. resext : '.res';
  44. resobjext : '.or';
  45. sharedlibext : '.so';
  46. staticlibext : '.a';
  47. staticlibprefix : 'libp';
  48. sharedlibprefix : 'lib';
  49. sharedClibext : '.so';
  50. staticClibext : '.a';
  51. staticClibprefix : 'lib';
  52. sharedClibprefix : 'lib';
  53. p_ext_support : false;
  54. Cprefix : '';
  55. newline : #10;
  56. dirsep : '/';
  57. files_case_relevent : true;
  58. assem : as_i386_elf32;
  59. assemextern : as_gas;
  60. link : nil;
  61. linkextern : nil;
  62. ar : ar_gnu_ar;
  63. res : res_none;
  64. script : script_unix;
  65. endian : endian_little;
  66. alignment :
  67. (
  68. procalign : 4;
  69. loopalign : 4;
  70. jumpalign : 0;
  71. constalignmin : 0;
  72. constalignmax : 4;
  73. varalignmin : 0;
  74. varalignmax : 4;
  75. localalignmin : 0;
  76. localalignmax : 4;
  77. recordalignmin : 0;
  78. recordalignmax : 2;
  79. maxCrecordalign : 4
  80. );
  81. first_parm_offset : 8;
  82. stacksize : 262144;
  83. DllScanSupported:false;
  84. use_function_relative_addresses : true
  85. );
  86. system_x86_64_freebsd_info : tsysteminfo =
  87. (
  88. system : system_x86_64_freebsd;
  89. name : 'FreeBSD for x86-64';
  90. shortname : 'FreeBSD';
  91. flags : [tf_needs_symbol_size,tf_pic_uses_got{,tf_smartlink_sections}];
  92. cpu : cpu_x86_64;
  93. unit_env : 'BSDUNITS';
  94. extradefines : 'UNIX;HASUNIX';
  95. exeext : '';
  96. defext : '.def';
  97. scriptext : '.sh';
  98. smartext : '.sl';
  99. unitext : '.ppu';
  100. unitlibext : '.ppl';
  101. asmext : '.s';
  102. objext : '.o';
  103. resext : '.res';
  104. resobjext : '.or';
  105. sharedlibext : '.so';
  106. staticlibext : '.a';
  107. staticlibprefix : 'libp';
  108. sharedlibprefix : 'lib';
  109. sharedClibext : '.so';
  110. staticClibext : '.a';
  111. staticClibprefix : 'lib';
  112. sharedClibprefix : 'lib';
  113. p_ext_support : false;
  114. Cprefix : '';
  115. newline : #10;
  116. dirsep : '/';
  117. files_case_relevent : true;
  118. assem : as_gas;
  119. assemextern : as_gas;
  120. link : nil;
  121. linkextern : nil;
  122. ar : ar_gnu_ar;
  123. res : res_none;
  124. script : script_unix;
  125. endian : endian_little;
  126. alignment :
  127. (
  128. procalign : 8;
  129. loopalign : 4;
  130. jumpalign : 0;
  131. constalignmin : 0;
  132. constalignmax : 8;
  133. varalignmin : 0;
  134. varalignmax : 8;
  135. localalignmin : 4;
  136. localalignmax : 8;
  137. recordalignmin : 0;
  138. recordalignmax : 8;
  139. maxCrecordalign : 8
  140. );
  141. first_parm_offset : 16;
  142. stacksize : 256*1024;
  143. DllScanSupported:false;
  144. use_function_relative_addresses : true
  145. );
  146. system_i386_netbsd_info : tsysteminfo =
  147. (
  148. system : system_i386_NetBSD;
  149. name : 'NetBSD for i386';
  150. shortname : 'NetBSD';
  151. flags : [tf_under_development];
  152. cpu : cpu_i386;
  153. unit_env : 'BSDUNITS';
  154. extradefines : 'UNIX;BSD;HASUNIX';
  155. exeext : '';
  156. defext : '.def';
  157. scriptext : '.sh';
  158. smartext : '.sl';
  159. unitext : '.ppu';
  160. unitlibext : '.ppl';
  161. asmext : '.s';
  162. objext : '.o';
  163. resext : '.res';
  164. resobjext : '.or';
  165. sharedlibext : '.so';
  166. staticlibext : '.a';
  167. staticlibprefix : 'libp';
  168. sharedlibprefix : 'lib';
  169. sharedClibext : '.so';
  170. staticClibext : '.a';
  171. staticClibprefix : 'lib';
  172. sharedClibprefix : 'lib';
  173. p_ext_support : false;
  174. Cprefix : '_';
  175. newline : #10;
  176. dirsep : '/';
  177. files_case_relevent : true;
  178. assem : as_gas;
  179. assemextern : as_gas;
  180. link : nil;
  181. linkextern : nil;
  182. ar : ar_gnu_ar;
  183. res : res_none;
  184. script : script_unix;
  185. endian : endian_little;
  186. alignment :
  187. (
  188. procalign : 4;
  189. loopalign : 4;
  190. jumpalign : 0;
  191. constalignmin : 0;
  192. constalignmax : 1;
  193. varalignmin : 0;
  194. varalignmax : 1;
  195. localalignmin : 0;
  196. localalignmax : 1;
  197. recordalignmin : 0;
  198. recordalignmax : 2;
  199. maxCrecordalign : 4
  200. );
  201. first_parm_offset : 8;
  202. stacksize : 262144;
  203. DllScanSupported:false;
  204. use_function_relative_addresses : true
  205. );
  206. system_i386_openbsd_info : tsysteminfo =
  207. (
  208. system : system_i386_OpenBSD;
  209. name : 'OpenBSD for i386';
  210. shortname : 'OpenBSD';
  211. flags : [tf_under_development];
  212. cpu : cpu_i386;
  213. unit_env : 'BSDUNITS';
  214. extradefines : 'UNIX;BSD;HASUNIX';
  215. exeext : '';
  216. defext : '.def';
  217. scriptext : '.sh';
  218. smartext : '.sl';
  219. unitext : '.ppu';
  220. unitlibext : '.ppl';
  221. asmext : '.s';
  222. objext : '.o';
  223. resext : '.res';
  224. resobjext : '.or';
  225. sharedlibext : '.so';
  226. staticlibext : '.a';
  227. staticlibprefix : 'libp';
  228. sharedlibprefix : 'lib';
  229. sharedClibext : '.so';
  230. staticClibext : '.a';
  231. staticClibprefix : 'lib';
  232. sharedClibprefix : 'lib';
  233. p_ext_support : false;
  234. Cprefix : '_';
  235. newline : #10;
  236. dirsep : '/';
  237. files_case_relevent : true;
  238. assem : as_gas;
  239. assemextern : as_gas;
  240. link : nil;
  241. linkextern : nil;
  242. ar : ar_gnu_ar;
  243. res : res_none;
  244. script : script_unix;
  245. endian : endian_little;
  246. alignment :
  247. (
  248. procalign : 4;
  249. loopalign : 4;
  250. jumpalign : 0;
  251. constalignmin : 0;
  252. constalignmax : 1;
  253. varalignmin : 0;
  254. varalignmax : 1;
  255. localalignmin : 0;
  256. localalignmax : 1;
  257. recordalignmin : 0;
  258. recordalignmax : 2;
  259. maxCrecordalign : 4
  260. );
  261. first_parm_offset : 8;
  262. stacksize : 262144;
  263. DllScanSupported:false;
  264. use_function_relative_addresses : true
  265. );
  266. system_m68k_netbsd_info : tsysteminfo =
  267. (
  268. system : system_m68k_NetBSD;
  269. name : 'NetBSD for m68k';
  270. shortname : 'NetBSD';
  271. flags : [tf_under_development];
  272. cpu : cpu_m68k;
  273. unit_env : 'BSDUNITS';
  274. extradefines : 'UNIX;BSD;HASUNIX';
  275. exeext : '';
  276. defext : '.def';
  277. scriptext : '.sh';
  278. smartext : '.sl';
  279. unitext : '.ppu';
  280. unitlibext : '.ppl';
  281. asmext : '.s';
  282. objext : '.o';
  283. resext : '.res';
  284. resobjext : '.or';
  285. sharedlibext : '.so';
  286. staticlibext : '.a';
  287. staticlibprefix : 'libp';
  288. sharedlibprefix : 'lib';
  289. sharedClibext : '.so';
  290. staticClibext : '.a';
  291. staticClibprefix : 'lib';
  292. sharedClibprefix : 'lib';
  293. p_ext_support : false;
  294. Cprefix : '';
  295. newline : #10;
  296. dirsep : '/';
  297. files_case_relevent : true;
  298. assem : as_gas;
  299. assemextern : as_gas;
  300. link : nil;
  301. linkextern : nil;
  302. ar : ar_gnu_ar;
  303. res : res_none;
  304. script : script_unix;
  305. endian : endian_big;
  306. alignment :
  307. (
  308. procalign : 4;
  309. loopalign : 4;
  310. jumpalign : 0;
  311. constalignmin : 0;
  312. constalignmax : 1;
  313. varalignmin : 0;
  314. varalignmax : 1;
  315. localalignmin : 0;
  316. localalignmax : 1;
  317. recordalignmin : 0;
  318. recordalignmax : 2;
  319. maxCrecordalign : 4
  320. );
  321. first_parm_offset : 8;
  322. stacksize : 262144;
  323. DllScanSupported:false;
  324. use_function_relative_addresses : true
  325. );
  326. system_powerpc_netbsd_info : tsysteminfo =
  327. (
  328. system : system_powerpc_netbsd;
  329. name : 'NetBSD for PowerPC';
  330. shortname : 'NetBSD';
  331. flags : [tf_under_development];
  332. cpu : cpu_powerpc;
  333. unit_env : '';
  334. extradefines : 'UNIX;BSD;HASUNIX';
  335. exeext : '';
  336. defext : '.def';
  337. scriptext : '.sh';
  338. smartext : '.sl';
  339. unitext : '.ppu';
  340. unitlibext : '.ppl';
  341. asmext : '.s';
  342. objext : '.o';
  343. resext : '.res';
  344. resobjext : '.or';
  345. sharedlibext : '.so';
  346. staticlibext : '.s';
  347. staticlibprefix : 'libp';
  348. sharedlibprefix : 'lib';
  349. sharedClibext : '.so';
  350. staticClibext : '.a';
  351. staticClibprefix : 'lib';
  352. sharedClibprefix : 'lib';
  353. p_ext_support : false;
  354. Cprefix : '';
  355. newline : #10;
  356. dirsep : '/';
  357. files_case_relevent : true;
  358. assem : as_gas;
  359. assemextern : as_gas;
  360. link : nil;
  361. linkextern : nil;
  362. ar : ar_gnu_ar;
  363. res : res_none;
  364. script : script_unix;
  365. endian : endian_big;
  366. alignment :
  367. (
  368. procalign : 4;
  369. loopalign : 4;
  370. jumpalign : 0;
  371. constalignmin : 0;
  372. constalignmax : 4;
  373. varalignmin : 0;
  374. varalignmax : 4;
  375. localalignmin : 0;
  376. localalignmax : 4;
  377. recordalignmin : 0;
  378. recordalignmax : 2;
  379. maxCrecordalign : 4 // should be 8 probably
  380. );
  381. first_parm_offset : 8;
  382. stacksize : 32*1024*1024;
  383. DllScanSupported:false;
  384. use_function_relative_addresses : true;
  385. { abi_powerpc_sysv doesn't work yet }
  386. abi : abi_powerpc_aix;
  387. );
  388. system_powerpc_darwin_info : tsysteminfo =
  389. (
  390. system : system_powerpc_darwin;
  391. name : 'Darwin for PowerPC';
  392. shortname : 'Darwin';
  393. flags : [];
  394. cpu : cpu_powerpc;
  395. unit_env : 'BSDUNITS';
  396. extradefines : 'UNIX;BSD;HASUNIX';
  397. exeext : '';
  398. defext : '.def';
  399. scriptext : '.sh';
  400. smartext : '.sl';
  401. unitext : '.ppu';
  402. unitlibext : '.ppl';
  403. asmext : '.s';
  404. objext : '.o';
  405. resext : '.res';
  406. resobjext : '.or';
  407. sharedlibext : '.dylib';
  408. staticlibext : '.a';
  409. staticlibprefix : 'libp';
  410. sharedlibprefix : 'lib';
  411. sharedClibext : '.dylib';
  412. staticClibext : '.a';
  413. staticClibprefix : 'lib';
  414. sharedClibprefix : 'lib';
  415. p_ext_support : true;
  416. Cprefix : '_';
  417. newline : #10;
  418. dirsep : '/';
  419. files_case_relevent : true;
  420. assem : as_darwin;
  421. assemextern : as_darwin;
  422. link : nil;
  423. linkextern : nil;
  424. ar : ar_gnu_ar;
  425. res : res_none;
  426. script : script_unix;
  427. endian : endian_big;
  428. alignment :
  429. (
  430. procalign : 16;
  431. loopalign : 4;
  432. jumpalign : 0;
  433. constalignmin : 0;
  434. constalignmax : 4;
  435. varalignmin : 0;
  436. varalignmax : 4;
  437. localalignmin : 0;
  438. localalignmax : 4;
  439. recordalignmin : 0;
  440. recordalignmax : 2;
  441. maxCrecordalign : 4
  442. );
  443. first_parm_offset : 24;
  444. stacksize : 262144;
  445. DllScanSupported:false;
  446. use_function_relative_addresses : false;
  447. abi : abi_powerpc_aix;
  448. );
  449. implementation
  450. initialization
  451. {$ifdef cpu86}
  452. {$ifdef FreeBSD}
  453. set_source_info(system_i386_FreeBSD_info);
  454. {$endif}
  455. {$ifdef NetBSD}
  456. set_source_info(system_i386_NetBSD_info);
  457. {$endif}
  458. {$ifdef OpenBSD}
  459. set_source_info(system_i386_NetBSD_info);
  460. {$endif}
  461. {$endif cpu86}
  462. {$ifdef cpux86_64}
  463. {$ifdef FreeBSD}
  464. set_source_info(system_x86_64_FreeBSD_info);
  465. {$endif}
  466. {$endif}
  467. {$ifdef cpu68}
  468. {$ifdef NetBSD}
  469. set_source_info(system_m68k_NetBSD_info);
  470. {$endif NetBSD}
  471. {$endif cpu68}
  472. {$ifdef cpupowerpc}
  473. {$ifdef Darwin}
  474. set_source_info(system_powerpc_darwin_info);
  475. {$endif Darwin}
  476. {$ifdef NetBSD}
  477. set_source_info(system_powerpc_netbsd_info);
  478. {$endif}
  479. {$endif cpu68}
  480. end.
  481. {
  482. $Log$
  483. Revision 1.17 2005-03-20 22:36:45 olle
  484. * Cleaned up handling of source file extension.
  485. + Added support for .p extension for macos and darwin
  486. Revision 1.16 2005/02/14 17:13:10 peter
  487. * truncate log
  488. Revision 1.15 2005/01/25 18:48:15 peter
  489. * tf_pic_uses_got added
  490. }