i_android.pas 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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_smartlink_library,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 : nil;
  61. linkextern : nil;
  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. );
  87. system_i386_android_info : tsysteminfo =
  88. (
  89. system : system_i386_ANDROID;
  90. name : 'Android for i386';
  91. shortname : 'Android';
  92. flags : [tf_needs_symbol_size,tf_pic_uses_got,tf_smartlink_sections,
  93. tf_needs_symbol_type,tf_files_case_sensitive,
  94. tf_smartlink_library,tf_needs_dwarf_cfi,tf_has_winlike_resources,
  95. tf_safecall_exceptions, tf_safecall_clearstack];
  96. cpu : cpu_i386;
  97. unit_env : 'ANDROIDUNITS';
  98. extradefines : 'UNIX;HASUNIX';
  99. exeext : '';
  100. defext : '.def';
  101. scriptext : '.sh';
  102. smartext : '.sl';
  103. unitext : '.ppu';
  104. unitlibext : '.ppl';
  105. asmext : '.s';
  106. objext : '.o';
  107. resext : '.res';
  108. resobjext : '.or';
  109. sharedlibext : '.so';
  110. staticlibext : '.a';
  111. staticlibprefix : 'libp';
  112. sharedlibprefix : 'lib';
  113. sharedClibext : '.so';
  114. staticClibext : '.a';
  115. staticClibprefix : 'lib';
  116. sharedClibprefix : 'lib';
  117. importlibprefix : 'libimp';
  118. importlibext : '.a';
  119. Cprefix : '';
  120. newline : #10;
  121. dirsep : '/';
  122. assem : as_i386_elf32;
  123. assemextern : as_gas;
  124. link : nil;
  125. linkextern : nil;
  126. ar : ar_gnu_ar;
  127. res : res_elf;
  128. dbg : dbg_stabs;
  129. script : script_unix;
  130. endian : endian_little;
  131. alignment :
  132. (
  133. procalign : 16;
  134. loopalign : 4;
  135. jumpalign : 0;
  136. constalignmin : 0;
  137. constalignmax : 8;
  138. varalignmin : 0;
  139. varalignmax : 16;
  140. localalignmin : 4;
  141. localalignmax : 8;
  142. recordalignmin : 0;
  143. recordalignmax : 16;
  144. maxCrecordalign : 4
  145. );
  146. first_parm_offset : 8;
  147. stacksize : 8*1024*1024;
  148. stackalign : 16;
  149. abi : abi_default
  150. );
  151. implementation
  152. initialization
  153. {$ifdef CPUI386}
  154. {$ifdef android}
  155. set_source_info(system_i386_android_info);
  156. {$endif}
  157. {$endif CPUI386}
  158. {$ifdef CPUARM}
  159. {$ifdef android}
  160. set_source_info(system_arm_android_info);
  161. {$endif android}
  162. {$endif CPUARM}
  163. end.