i_android.pas 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. {
  2. Copyright (c) 1998-2012 by Peter Vreman
  3. This unit implements support information structures for Android
  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 android. }
  18. unit i_android;
  19. {$i fpcdefs.inc}
  20. interface
  21. uses
  22. systems, rescmn;
  23. const
  24. system_arm_android_info : tsysteminfo =
  25. (
  26. system : system_arm_Android;
  27. name : 'Android for ARMEL';
  28. shortname : 'Android';
  29. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  30. tf_requires_proper_alignment, tf_safecall_exceptions,
  31. tf_smartlink_sections,tf_has_winlike_resources];
  32. cpu : cpu_arm;
  33. unit_env : 'ANDROIDUNITS';
  34. extradefines : 'UNIX;HASUNIX;CPUARMEL';
  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. importlibprefix : 'libimp';
  54. importlibext : '.a';
  55. Cprefix : '';
  56. newline : #10;
  57. dirsep : '/';
  58. assem : as_gas;
  59. assemextern : as_gas;
  60. link : ld_none;
  61. linkextern : ld_android;
  62. ar : ar_gnu_ar;
  63. res : res_elf;
  64. dbg : dbg_stabs;
  65. script : script_unix;
  66. endian : endian_little;
  67. alignment :
  68. (
  69. procalign : 4;
  70. loopalign : 4;
  71. jumpalign : 0;
  72. constalignmin : 0;
  73. constalignmax : 8;
  74. varalignmin : 0;
  75. varalignmax : 8;
  76. localalignmin : 4;
  77. localalignmax : 8;
  78. recordalignmin : 0;
  79. recordalignmax : 8;
  80. maxCrecordalign : 8
  81. );
  82. first_parm_offset : 8;
  83. stacksize : 8*1024*1024;
  84. stackalign : 8;
  85. abi : abi_eabi;
  86. 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-S64';
  87. );
  88. system_i386_android_info : tsysteminfo =
  89. (
  90. system : system_i386_ANDROID;
  91. name : 'Android for i386';
  92. shortname : 'Android';
  93. flags : [tf_needs_symbol_size,tf_pic_uses_got,tf_smartlink_sections,
  94. tf_needs_symbol_type,tf_files_case_sensitive,
  95. tf_needs_dwarf_cfi,tf_has_winlike_resources,
  96. tf_safecall_exceptions, tf_safecall_clearstack];
  97. cpu : cpu_i386;
  98. unit_env : 'ANDROIDUNITS';
  99. extradefines : 'UNIX;HASUNIX';
  100. exeext : '';
  101. defext : '.def';
  102. scriptext : '.sh';
  103. smartext : '.sl';
  104. unitext : '.ppu';
  105. unitlibext : '.ppl';
  106. asmext : '.s';
  107. objext : '.o';
  108. resext : '.res';
  109. resobjext : '.or';
  110. sharedlibext : '.so';
  111. staticlibext : '.a';
  112. staticlibprefix : 'libp';
  113. sharedlibprefix : 'lib';
  114. sharedClibext : '.so';
  115. staticClibext : '.a';
  116. staticClibprefix : 'lib';
  117. sharedClibprefix : 'lib';
  118. importlibprefix : 'libimp';
  119. importlibext : '.a';
  120. Cprefix : '';
  121. newline : #10;
  122. dirsep : '/';
  123. assem : as_i386_elf32;
  124. assemextern : as_gas;
  125. link : ld_none;
  126. linkextern : ld_android;
  127. ar : ar_gnu_ar;
  128. res : res_elf;
  129. dbg : dbg_stabs;
  130. script : script_unix;
  131. endian : endian_little;
  132. alignment :
  133. (
  134. procalign : 16;
  135. loopalign : 4;
  136. jumpalign : 0;
  137. constalignmin : 0;
  138. constalignmax : 8;
  139. varalignmin : 0;
  140. varalignmax : 16;
  141. localalignmin : 4;
  142. localalignmax : 8;
  143. recordalignmin : 0;
  144. recordalignmax : 16;
  145. maxCrecordalign : 4
  146. );
  147. first_parm_offset : 8;
  148. stacksize : 8*1024*1024;
  149. stackalign : 16;
  150. abi : abi_default;
  151. 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-S128';
  152. );
  153. system_mipsel_android_info : tsysteminfo =
  154. (
  155. system : system_mipsel_android;
  156. name : 'Android for MIPSEL';
  157. shortname : 'Android';
  158. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  159. tf_requires_proper_alignment,tf_pic_default,tf_safecall_exceptions,
  160. tf_smartlink_sections,tf_has_winlike_resources];
  161. cpu : cpu_mipsel;
  162. unit_env : 'ANDROIDUNITS';
  163. extradefines : 'UNIX;HASUNIX';
  164. exeext : '';
  165. defext : '.def';
  166. scriptext : '.sh';
  167. smartext : '.sl';
  168. unitext : '.ppu';
  169. unitlibext : '.ppl';
  170. asmext : '.s';
  171. objext : '.o';
  172. resext : '.res';
  173. resobjext : '.or';
  174. sharedlibext : '.so';
  175. staticlibext : '.a';
  176. staticlibprefix : 'libp';
  177. sharedlibprefix : 'lib';
  178. sharedClibext : '.so';
  179. staticClibext : '.a';
  180. staticClibprefix : 'lib';
  181. sharedClibprefix : 'lib';
  182. importlibprefix : 'libimp';
  183. importlibext : '.a';
  184. Cprefix : '';
  185. newline : #10;
  186. dirsep : '/';
  187. assem : as_gas;
  188. assemextern : as_gas;
  189. link : ld_none;
  190. linkextern : ld_android;
  191. ar : ar_gnu_ar;
  192. res : res_elf;
  193. dbg : dbg_stabs;
  194. script : script_unix;
  195. endian : endian_little;
  196. alignment :
  197. (
  198. procalign : 4;
  199. loopalign : 4;
  200. jumpalign : 0;
  201. constalignmin : 0;
  202. constalignmax : 8;
  203. varalignmin : 0;
  204. varalignmax : 8;
  205. localalignmin : 4;
  206. localalignmax : 8;
  207. recordalignmin : 0;
  208. recordalignmax : 8;
  209. maxCrecordalign : 8
  210. );
  211. first_parm_offset : 0;
  212. stacksize : 32*1024*1024;
  213. stackalign : 8;
  214. abi : abi_default;
  215. llvmdatalayout : 'e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32-S64';
  216. );
  217. implementation
  218. initialization
  219. {$ifdef CPUI386}
  220. {$ifdef android}
  221. set_source_info(system_i386_android_info);
  222. {$endif}
  223. {$endif CPUI386}
  224. {$ifdef CPUARM}
  225. {$ifdef android}
  226. set_source_info(system_arm_android_info);
  227. {$endif android}
  228. {$endif CPUARM}
  229. {$ifdef CPUMIPSEL}
  230. {$ifdef android}
  231. set_source_info(system_mipsel_android_info);
  232. {$endif android}
  233. {$endif CPUMIPSEL}
  234. end.