home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / zip / gnu / gccsrc3.lzh / GCCSRC3 / TM-ATARI.H < prev    next >
C/C++ Source or Header  |  1993-07-23  |  4KB  |  158 lines

  1. /* target def file for atarist (both TOS and MINIX), for use with GNU CC */
  2.  
  3. /* The following Macros control the compilation
  4.  *
  5.  *    CROSSATARI    defined when making cross compiler for TOS or Minix
  6.  *    MINIX        defined when making cross compiler for MINIX only
  7.  *    atariminix    defined when making compiler for MINIX
  8.  *    atarist        defined when making compiler for TOS
  9.  */
  10.  
  11. #include "tm-m68k.h"
  12.  
  13. #ifndef CROSSATARI
  14. #ifndef atarist
  15. #undef alloca
  16. #endif
  17. #endif
  18.  
  19. /* See tm-m68k.h.  0 means 68000 with no 68881.  */
  20.  
  21. #define TARGET_DEFAULT 0
  22.  
  23. /* -m68020 requires special flags to the assembler.  */
  24.  
  25. /* -m68000 (on atari) need this flag to assembler, otherwise pc relative
  26.    code is produced where it should not be (in places where the
  27.    68000 only allows data ALTERABLE addressing modes) (++jrb 03/19/89) */
  28. #define ASM_SPEC "%{m68020:-mc68020}%{!m68020:-m68000}"
  29.  
  30. #if 1
  31.    /* now, we pick up PARAM_BOUNDARY from tm-m68k.h -- implies changes in
  32.    in library *.s files and in files like doprintf.c etc that
  33.    took variable no. of arguements */
  34.    /* *******#undef PARM_BOUNDARY #define PARM_BOUNDARY 32 ********* */
  35.    /* FINALLY works !!!!! */
  36. #else
  37. /* */
  38. #endif
  39.  
  40. /* Names to predefine in the preprocessor for this target machine.  */
  41.  
  42. #if (defined(MINIX) || defined(atariminix))
  43. #define CPP_PREDEFINES "-DATARI_ST -Dminix -Dm68k"
  44. #else
  45. #define CPP_PREDEFINES "-Datarist -Dgem -Dm68k"
  46. #endif
  47.  
  48. /* default exec dir */
  49. #ifndef STANDARD_EXEC_PREFIX
  50. #ifdef MINIX
  51. #define STANDARD_EXEC_PREFIX "/dsrg/bammi/cross-minix/lib/gcc-"
  52. #else
  53. #ifdef atariminix
  54. #define STANDARD_EXEC_PREFIX "/usr/local/lib/gcc-"
  55. #else
  56. #define STANDARD_EXEC_PREFIX "/dsrg/bammi/cross-gcc/lib/gcc-"
  57. #endif
  58. #endif
  59. #endif
  60.  
  61. /* Alignment of field after `int : 0' in a structure.  */
  62. /* recent gcc's have this as 16, this is left in for the benfit of */
  63.  /* older gcc */
  64. #undef EMPTY_FIELD_BOUNDARY
  65. #define EMPTY_FIELD_BOUNDARY 16
  66.  
  67. /* Every structure or union's size must be a multiple of 2 bytes.  */
  68.  
  69. #undef STRUCTURE_SIZE_BOUNDARY
  70. #define STRUCTURE_SIZE_BOUNDARY 16
  71.  
  72. /* code seems to assume this... */
  73. #define DBX_DEBUGGING_INFO
  74.  
  75. #ifndef HAVE_VPRINTF
  76. #define HAVE_VPRINTF 1
  77. #endif
  78.  
  79. #ifdef abort
  80. #undef abort
  81. #define abort fancy_abort
  82. #endif
  83.  
  84.  
  85. /* the following stolen from tm-sun3.h, they seem to work better */
  86. /* This is how to output an assembler line defining a `double' constant.  */
  87.  
  88. #undef ASM_OUTPUT_DOUBLE
  89. #define ASM_OUTPUT_DOUBLE(FILE,VALUE)                    \
  90.    fprintf (FILE, "\t.double 0r%.20e\n", (VALUE))
  91.  
  92. /* This is how to output an assembler line defining a `float' constant.  */
  93.  
  94. #undef ASM_OUTPUT_FLOAT
  95. #define ASM_OUTPUT_FLOAT(FILE,VALUE)                    \
  96.    fprintf (FILE, "\t.single 0r%.20e\n", (VALUE))
  97.  
  98. #undef ASM_OUTPUT_FLOAT_OPERAND
  99. #define ASM_OUTPUT_FLOAT_OPERAND(FILE,VALUE)                \
  100.    fprintf (FILE, "#0r%.9g", (VALUE))
  101.  
  102. #undef ASM_OUTPUT_DOUBLE_OPERAND
  103. #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE)                \
  104.    fprintf (FILE, "#0r%.20g", (VALUE))
  105.  
  106. /* these moved here from xm-atari.h */
  107. /* specs for start file and link specs */
  108.  
  109. #ifndef CROSSATARI
  110.  
  111. #ifdef atariminix
  112. #define STARTFILE_SPEC  \
  113.   "%{pg:/usr/local/lib/gcrt0.o%s}\
  114.    %{!pg:\
  115.          %{p:/usr/local/lib/mcrtso.o%s}\
  116.          %{!p:/usr/local/lib/crtso.o%s}}"
  117. #else /* atarist */
  118. #define STARTFILE_SPEC  \
  119.   "%{pg:$GNULIB$\\gcrt0.o%s}%{!pg:%{p:$GNULIB$\\mcrt0.o%s}%{!p:$GNULIB$\\crt0.o%s}}"
  120. #endif
  121.  
  122. #else    /* CROSSATARI */
  123.  
  124. #ifdef MINIX
  125. #define STARTFILE_SPEC  \
  126.   "%{pg:/dsrg/bammi/cross-minix/lib/gcrt0.o%s}\
  127.    %{!pg:\
  128.          %{p:/dsrg/bammi/cross-minix/lib/mcrtso.o%s}\
  129.          %{!p:/dsrg/bammi/cross-minix/lib/crtso.o%s}}"
  130. #else
  131. #define STARTFILE_SPEC  \
  132.   "%{pg:/dsrg/bammi/cross-gcc/lib/gcrt0.o%s}\
  133.    %{!pg:\
  134.          %{p:/dsrg/bammi/cross-gcc/lib/mcrt0.o%s}\
  135.          %{!p:/dsrg/bammi/cross-gcc/lib/crt0.o%s}}"
  136. #endif
  137. #endif /* CROSSATARI */
  138.  
  139. #ifdef MINIX
  140. #define LIB_SPEC \
  141.   "%{mshort:/dsrg/bammi/cross-minix/lib/libc.a}\
  142.    %{!mshort:/dsrg/bammi/cross-minix/lib/libc32.a}"
  143. #else
  144. #ifdef atariminix
  145. #define LIB_SPEC \
  146.   "%{mshort:/usr/local/lib/libc.a}\
  147.    %{!mshort:/usr/local/lib/libc32.a}"
  148. #else /* atarist cross or native */
  149. #define LIB_SPEC \
  150.   "%{!gg:\
  151.          %{mshort:-lgnu16}\
  152.          %{!mshort:-lgnu}}\
  153.     %{gg:\
  154.          %{mshort:-lgnugdb16}\
  155.          %{!mshort:-lgnugdb}}"
  156. #endif
  157. #endif
  158.