i_android.pas 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  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_pic_uses_got, tf_pic_default,
  32. tf_smartlink_sections,tf_has_winlike_resources];
  33. cpu : cpu_arm;
  34. unit_env : 'ANDROIDUNITS';
  35. extradefines : 'UNIX;HASUNIX;CPUARMEL';
  36. exeext : '';
  37. defext : '.def';
  38. scriptext : '.sh';
  39. smartext : '.sl';
  40. unitext : '.ppu';
  41. unitlibext : '.ppl';
  42. asmext : '.s';
  43. objext : '.o';
  44. resext : '.res';
  45. resobjext : '.or';
  46. sharedlibext : '.so';
  47. staticlibext : '.a';
  48. staticlibprefix : 'libp';
  49. sharedlibprefix : 'lib';
  50. sharedClibext : '.so';
  51. staticClibext : '.a';
  52. staticClibprefix : 'lib';
  53. sharedClibprefix : 'lib';
  54. importlibprefix : 'libimp';
  55. importlibext : '.a';
  56. Cprefix : '';
  57. newline : #10;
  58. dirsep : '/';
  59. assem : as_gas;
  60. assemextern : as_gas;
  61. link : ld_none;
  62. linkextern : ld_android;
  63. ar : ar_gnu_ar;
  64. res : res_elf;
  65. dbg : dbg_stabs;
  66. script : script_unix;
  67. endian : endian_little;
  68. alignment :
  69. (
  70. procalign : 4;
  71. loopalign : 4;
  72. jumpalign : 0;
  73. constalignmin : 0;
  74. constalignmax : 8;
  75. varalignmin : 0;
  76. varalignmax : 8;
  77. localalignmin : 4;
  78. localalignmax : 8;
  79. recordalignmin : 0;
  80. recordalignmax : 8;
  81. maxCrecordalign : 8
  82. );
  83. first_parm_offset : 8;
  84. stacksize : 8*1024*1024;
  85. stackalign : 8;
  86. abi : abi_eabi
  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_needs_symbol_type,tf_files_case_sensitive,
  94. tf_needs_dwarf_cfi,tf_has_winlike_resources,
  95. tf_pic_uses_got, tf_pic_default, tf_smartlink_sections,
  96. tf_safecall_exceptions];
  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. );
  152. system_mipsel_android_info : tsysteminfo =
  153. (
  154. system : system_mipsel_android;
  155. name : 'Android for MIPSEL';
  156. shortname : 'Android';
  157. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  158. tf_requires_proper_alignment,tf_pic_default,tf_safecall_exceptions,
  159. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  160. cpu : cpu_mipsel;
  161. unit_env : 'ANDROIDUNITS';
  162. extradefines : 'UNIX;HASUNIX';
  163. exeext : '';
  164. defext : '.def';
  165. scriptext : '.sh';
  166. smartext : '.sl';
  167. unitext : '.ppu';
  168. unitlibext : '.ppl';
  169. asmext : '.s';
  170. objext : '.o';
  171. resext : '.res';
  172. resobjext : '.or';
  173. sharedlibext : '.so';
  174. staticlibext : '.a';
  175. staticlibprefix : 'libp';
  176. sharedlibprefix : 'lib';
  177. sharedClibext : '.so';
  178. staticClibext : '.a';
  179. staticClibprefix : 'lib';
  180. sharedClibprefix : 'lib';
  181. importlibprefix : 'libimp';
  182. importlibext : '.a';
  183. Cprefix : '';
  184. newline : #10;
  185. dirsep : '/';
  186. assem : as_gas;
  187. assemextern : as_gas;
  188. link : ld_none;
  189. linkextern : ld_android;
  190. ar : ar_gnu_ar;
  191. res : res_elf;
  192. dbg : dbg_stabs;
  193. script : script_unix;
  194. endian : endian_little;
  195. alignment :
  196. (
  197. procalign : 4;
  198. loopalign : 4;
  199. jumpalign : 0;
  200. constalignmin : 0;
  201. constalignmax : 8;
  202. varalignmin : 0;
  203. varalignmax : 8;
  204. localalignmin : 4;
  205. localalignmax : 8;
  206. recordalignmin : 0;
  207. recordalignmax : 8;
  208. maxCrecordalign : 8
  209. );
  210. first_parm_offset : 0;
  211. stacksize : 32*1024*1024;
  212. stackalign : 8;
  213. abi : abi_default
  214. );
  215. implementation
  216. initialization
  217. {$ifdef CPUI386}
  218. {$ifdef android}
  219. set_source_info(system_i386_android_info);
  220. {$endif}
  221. {$endif CPUI386}
  222. {$ifdef CPUARM}
  223. {$ifdef android}
  224. set_source_info(system_arm_android_info);
  225. {$endif android}
  226. {$endif CPUARM}
  227. {$ifdef CPUMIPSEL}
  228. {$ifdef android}
  229. set_source_info(system_mipsel_android_info);
  230. {$endif android}
  231. {$endif CPUMIPSEL}
  232. end.