i_haiku.pas 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. {
  2. Copyright (c) 1998-2002 by Peter Vreman
  3. Copyright (c) 2008-2008 by Olivier Coursière
  4. This unit implements support information structures for Haiku
  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. { This unit implements support information structures for Haiku. }
  19. unit i_haiku;
  20. {$i fpcdefs.inc}
  21. interface
  22. uses
  23. systems;
  24. const
  25. system_i386_haiku_info : tsysteminfo =
  26. (
  27. system : system_i386_Haiku;
  28. name : 'Haiku for i386';
  29. shortname : 'Haiku';
  30. flags : [tf_under_development,tf_needs_symbol_size,tf_files_case_sensitive,tf_use_function_relative_addresses,
  31. tf_smartlink_sections, tf_smartlink_library];
  32. cpu : cpu_i386;
  33. unit_env : 'HAIKUUNITS';
  34. extradefines : 'BEOS;UNIX;HASUNIX';
  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_i386_elf32;
  59. assemextern : as_gas;
  60. link : nil;
  61. linkextern : nil;
  62. ar : ar_gnu_ar;
  63. res : res_none;
  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 : 4;
  74. varalignmin : 0;
  75. varalignmax : 4;
  76. localalignmin : 0;
  77. localalignmax : 4;
  78. recordalignmin : 0;
  79. recordalignmax : 2;
  80. maxCrecordalign : 4
  81. );
  82. first_parm_offset : 8;
  83. { Stack size used to be 256 K under BeOS. So, it was the value
  84. used in previous version of FPC for BeOS (but lost in the road
  85. to 2.* ;-).
  86. According to buildtools/gcc/gcc/config/i386/beos-elf.h in the
  87. Haiku's repository, this value was increased to 1Mb since r4.1b3.
  88. Under R5, this value is even greater. listarea report a default
  89. size of 16 Mb for the user stack of the main thread.
  90. People who still use BeOS nowadays should use R5 (or Haiku),
  91. so i use this new value.
  92. }
  93. stacksize : 16 * 1024 * 1024;
  94. abi : abi_default
  95. );
  96. implementation
  97. initialization
  98. {$ifdef cpu86}
  99. {$ifdef haiku}
  100. set_source_info(system_i386_haiku_info);
  101. {$endif haiku}
  102. {$endif cpu86}
  103. end.