i_win.pas 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. {
  2. Copyright (c) 1998-2008 by Peter Vreman
  3. This unit implements support information structures for win32
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. ****************************************************************************
  16. }
  17. { This unit implements support information structures for win32. }
  18. unit i_win;
  19. {$i fpcdefs.inc}
  20. interface
  21. uses
  22. systems;
  23. const
  24. system_i386_win32_info : tsysteminfo =
  25. (
  26. system : system_i386_WIN32;
  27. name : 'Win32 for i386';
  28. shortname : 'Win32';
  29. flags : [tf_files_case_aware,tf_has_dllscanner,tf_smartlink_library
  30. ,tf_smartlink_sections{,tf_section_threadvars}{,tf_needs_dwarf_cfi},
  31. tf_winlikewidestring,tf_no_pic_supported,
  32. tf_no_generic_stackcheck,tf_has_winlike_resources,
  33. tf_dwarf_only_local_labels,
  34. tf_safecall_exceptions,tf_no_backquote_support];
  35. cpu : cpu_i386;
  36. unit_env : 'WIN32UNITS';
  37. extradefines : 'MSWINDOWS;WINDOWS';
  38. exeext : '.exe';
  39. defext : '.def';
  40. scriptext : '.bat';
  41. smartext : '.sl';
  42. unitext : '.ppu';
  43. unitlibext : '.ppl';
  44. asmext : '.s';
  45. objext : '.o';
  46. resext : '.res';
  47. resobjext : '.or';
  48. sharedlibext : '.dll';
  49. staticlibext : '.a';
  50. staticlibprefix : 'libp';
  51. sharedlibprefix : '';
  52. sharedClibext : '.dll';
  53. staticClibext : '.a';
  54. staticClibprefix : 'lib';
  55. sharedClibprefix : '';
  56. importlibprefix : 'libimp';
  57. importlibext : '.a';
  58. Cprefix : '_';
  59. newline : #13#10;
  60. dirsep : '\';
  61. assem : as_i386_pecoff;
  62. assemextern : as_gas;
  63. link : ld_int_windows;
  64. linkextern : ld_windows;
  65. ar : ar_gnu_ar;
  66. res : res_gnu_windres;
  67. dbg : dbg_stabs;
  68. script : script_dos;
  69. endian : endian_little;
  70. alignment :
  71. (
  72. procalign : 16;
  73. loopalign : 4;
  74. jumpalign : 0;
  75. constalignmin : 0;
  76. constalignmax : 16;
  77. varalignmin : 0;
  78. varalignmax : 16;
  79. localalignmin : 4;
  80. localalignmax : 8;
  81. recordalignmin : 0;
  82. recordalignmax : 4;
  83. maxCrecordalign : 16
  84. );
  85. first_parm_offset : 8;
  86. stacksize : 16*1024*1024;
  87. stackalign : 4;
  88. abi : abi_default;
  89. );
  90. system_x64_win64_info : tsysteminfo =
  91. (
  92. system : system_x86_64_win64;
  93. name : 'Win64 for x64';
  94. shortname : 'Win64';
  95. flags : [tf_files_case_aware,tf_has_dllscanner,
  96. tf_smartlink_sections,tf_smartlink_library,
  97. tf_winlikewidestring,tf_no_pic_supported,
  98. tf_dwarf_only_local_labels,
  99. tf_no_generic_stackcheck,tf_has_winlike_resources,
  100. tf_safecall_exceptions,tf_no_backquote_support];
  101. cpu : cpu_x86_64;
  102. unit_env : 'WIN64UNITS';
  103. extradefines : 'MSWINDOWS;WINDOWS';
  104. exeext : '.exe';
  105. defext : '.def';
  106. scriptext : '.bat';
  107. smartext : '.sl';
  108. unitext : '.ppu';
  109. unitlibext : '.ppl';
  110. asmext : '.s';
  111. objext : '.o';
  112. resext : '.res';
  113. resobjext : '.obj';
  114. sharedlibext : '.dll';
  115. staticlibext : '.a';
  116. staticlibprefix : 'libp';
  117. sharedlibprefix : '';
  118. sharedClibext : '.dll';
  119. staticClibext : '.a';
  120. staticClibprefix : 'lib';
  121. sharedClibprefix : '';
  122. importlibprefix : 'libimp';
  123. importlibext : '.a';
  124. Cprefix : '';
  125. newline : #13#10;
  126. dirsep : '\';
  127. assem : as_x86_64_pecoff;
  128. assemextern : as_gas;
  129. link : ld_int_windows;
  130. linkextern : ld_windows;
  131. ar : ar_gnu_ar;
  132. res : res_gnu_windres;
  133. dbg : dbg_dwarf2;
  134. script : script_dos;
  135. endian : endian_little;
  136. alignment :
  137. (
  138. procalign : 16;
  139. loopalign : 8;
  140. jumpalign : 0;
  141. constalignmin : 0;
  142. constalignmax : 16;
  143. varalignmin : 0;
  144. varalignmax : 16;
  145. localalignmin : 8;
  146. localalignmax : 16;
  147. recordalignmin : 0;
  148. recordalignmax : 8;
  149. maxCrecordalign : 16
  150. );
  151. first_parm_offset : 16;
  152. stacksize : 16*1024*1024;
  153. stackalign : 16;
  154. abi : abi_default;
  155. );
  156. system_arm_wince_info : tsysteminfo =
  157. (
  158. system : system_arm_wince;
  159. name : 'WinCE for ARM';
  160. shortname : 'WinCE';
  161. flags : [tf_files_case_aware{,tf_winlikewidestring},
  162. tf_smartlink_sections,tf_requires_proper_alignment,tf_no_pic_supported,
  163. tf_has_winlike_resources,
  164. tf_safecall_exceptions,tf_no_backquote_support];
  165. cpu : cpu_arm;
  166. unit_env : '';
  167. extradefines : 'UNDER_CE;WINDOWS;FPC_OS_UNICODE';
  168. exeext : '.exe';
  169. defext : '.def';
  170. scriptext : '.bat';
  171. smartext : '.sl';
  172. unitext : '.ppu';
  173. unitlibext : '.ppl';
  174. asmext : '.s';
  175. objext : '.o';
  176. resext : '.res';
  177. resobjext : '.or';
  178. sharedlibext : '.dll';
  179. staticlibext : '.a';
  180. staticlibprefix : 'libp';
  181. sharedlibprefix : '';
  182. sharedClibext : '.dll';
  183. staticClibext : '.a';
  184. staticClibprefix : 'lib';
  185. sharedClibprefix : '';
  186. importlibprefix : 'libimp';
  187. importlibext : '.a';
  188. Cprefix : '';
  189. newline : #13#10;
  190. dirsep : '\';
  191. assem : as_gas;
  192. assemextern : as_gas;
  193. link : ld_int_windows;
  194. linkextern : ld_windows;
  195. ar : ar_gnu_ar_scripted;
  196. res : res_gnu_windres;
  197. dbg : dbg_stabs;
  198. script : script_dos;
  199. endian : endian_little;
  200. alignment :
  201. (
  202. procalign : 4;
  203. loopalign : 4;
  204. jumpalign : 0;
  205. constalignmin : 0;
  206. constalignmax : 4;
  207. varalignmin : 0;
  208. varalignmax : 4;
  209. localalignmin : 0;
  210. localalignmax : 4;
  211. recordalignmin : 0;
  212. recordalignmax : 4;
  213. maxCrecordalign : 4
  214. );
  215. first_parm_offset : 8;
  216. stacksize : 262144;
  217. stackalign : 4;
  218. abi : abi_default;
  219. );
  220. system_i386_wince_info : tsysteminfo =
  221. (
  222. system : system_i386_wince;
  223. name : 'WinCE for i386';
  224. shortname : 'WinCE';
  225. flags : [tf_files_case_aware
  226. {,tf_winlikewidestring},tf_smartlink_sections,tf_no_pic_supported,
  227. tf_has_winlike_resources,
  228. tf_safecall_exceptions,tf_no_backquote_support];
  229. cpu : cpu_i386;
  230. unit_env : '';
  231. extradefines : 'UNDER_CE;WINDOWS;FPC_OS_UNICODE';
  232. exeext : '.exe';
  233. defext : '.def';
  234. scriptext : '.bat';
  235. smartext : '.sl';
  236. unitext : '.ppu';
  237. unitlibext : '.ppl';
  238. asmext : '.s';
  239. objext : '.o';
  240. resext : '.res';
  241. resobjext : '.or';
  242. sharedlibext : '.dll';
  243. staticlibext : '.a';
  244. staticlibprefix : 'libp';
  245. sharedlibprefix : '';
  246. sharedClibext : '.dll';
  247. staticClibext : '.a';
  248. staticClibprefix : 'lib';
  249. sharedClibprefix : '';
  250. importlibprefix : 'libimp';
  251. importlibext : '.a';
  252. Cprefix : '_';
  253. newline : #13#10;
  254. dirsep : '\';
  255. assem : as_i386_pecoffwince;
  256. assemextern : as_gas;
  257. link : ld_int_windows;
  258. linkextern : ld_windows;
  259. ar : ar_gnu_ar_scripted;
  260. res : res_gnu_windres;
  261. dbg : dbg_stabs;
  262. script : script_dos;
  263. endian : endian_little;
  264. alignment :
  265. (
  266. procalign : 4;
  267. loopalign : 4;
  268. jumpalign : 0;
  269. constalignmin : 0;
  270. constalignmax : 4;
  271. varalignmin : 0;
  272. varalignmax : 4;
  273. localalignmin : 4;
  274. localalignmax : 4;
  275. recordalignmin : 0;
  276. recordalignmax : 4;
  277. maxCrecordalign : 16
  278. );
  279. first_parm_offset : 8;
  280. stacksize : 262144;
  281. stackalign : 4;
  282. abi : abi_default;
  283. );
  284. implementation
  285. initialization
  286. {$ifdef CPUI386}
  287. {$ifdef WIN32}
  288. {$ifndef WDOSX}
  289. set_source_info(system_i386_win32_info);
  290. {$endif WDOSX}
  291. {$endif WIN32}
  292. {$ifdef WINCE}
  293. set_source_info(system_i386_wince_info);
  294. {$endif WINCE}
  295. {$endif CPUI386}
  296. {$ifdef CPUX86_64}
  297. {$ifdef WIN64}
  298. {$ifndef WDOSX}
  299. set_source_info(system_x64_win64_info);
  300. {$endif WDOSX}
  301. {$endif WIN64}
  302. {$endif CPUX86_64}
  303. {$ifdef CPUARM}
  304. {$ifdef WINCE}
  305. set_source_info(system_arm_wince_info);
  306. {$endif WINCE}
  307. {$endif CPUARM}
  308. end.