i_darwin.pas 27 KB

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