home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / gcc-2.7.2.1-base.tgz / gcc-2.7.2.1-base.tar / fsf / gcc / config / mips / svr4-5.h < prev    next >
C/C++ Source or Header  |  1995-06-15  |  3KB  |  92 lines

  1. /* Definitions of target machine for GNU compiler.  MIPS RISC-OS 5.0 System V.4 version.
  2.    Copyright (C) 1992 Free Software Foundation, Inc.
  3.  
  4. This file is part of GNU CC.
  5.  
  6. GNU CC is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2, or (at your option)
  9. any later version.
  10.  
  11. GNU CC is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with GNU CC; see the file COPYING.  If not, write to
  18. the Free Software Foundation, 59 Temple Place - Suite 330,
  19. Boston, MA 02111-1307, USA.  */
  20.  
  21. #define MIPS_SVR4
  22.  
  23. #define CPP_PREDEFINES \
  24. "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_SVR4 \
  25. -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_SVR4 \
  26. -D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32 \
  27. -Asystem(unix) -Asystem(svr4) -Acpu(mips) -Amachine(mips)"
  28.  
  29. #define STANDARD_INCLUDE_DIR "/svr4/usr/include"
  30.  
  31. #define LINK_SPEC "\
  32. %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \
  33. %{bestGnum} %{shared} %{non_shared} \
  34. %{call_shared} %{no_archive} %{exact_version} \
  35. %{!shared: %{!non_shared: %{!call_shared: -non_shared}}} \
  36. -systype /svr4/ "
  37.             
  38. #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s"
  39.  
  40. #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt1.o%s}}\
  41.     %{ansi:/svr4/usr/ccs/lib/values-Xc.o%s} \
  42.                           %{!ansi: \
  43.                            %{traditional:/svr4/usr/ccs/lib/values-Xt.o%s} \
  44.                            %{!traditional:/svr4/usr/ccs/lib/values-Xa.o%s}}"
  45.  
  46. #define MACHINE_TYPE "RISC-OS System V.4 Mips"
  47.  
  48. /* Override defaults for finding the MIPS tools.  */
  49. #define MD_STARTFILE_PREFIX "/svr4/usr/lib/cmplrs/cc/"
  50. #define MD_EXEC_PREFIX "/svr4/usr/lib/cmplrs/cc/"
  51.  
  52. /* Mips System V.4 doesn't have a getpagesize() function needed by the
  53.    trampoline code, so use the POSIX sysconf function to get it.
  54.    This is only done when compiling the trampoline code.  */
  55.  
  56. #ifdef  L_trampoline
  57. #include <unistd.h>
  58.  
  59. /* In at least 5.0 and 5.01, there is no _SC_PAGE_SIZE macro, only a
  60.    _SC_PAGESIZE macro.  */
  61. #ifdef _SC_PAGESIZE
  62. #define _SC_PAGE_SIZE _SC_PAGESIZE
  63. #endif
  64.  
  65. #define getpagesize()    sysconf(_SC_PAGE_SIZE)
  66. #endif /*  L_trampoline */
  67.  
  68. /* Use atexit for static constructors/destructors, instead of defining
  69.    our own exit function.  */
  70. #define HAVE_ATEXIT
  71.  
  72. /* Generate calls to memcpy, etc., not bcopy, etc.  */
  73. #define TARGET_MEM_FUNCTIONS
  74.  
  75. #include "mips/mips.h"
  76.  
  77. /* Some assemblers have a bug that causes backslash escaped chars in .ascii
  78.    to be misassembled, so we just completely avoid it.  */
  79. #undef ASM_OUTPUT_ASCII
  80. #define ASM_OUTPUT_ASCII(FILE,PTR,LEN)            \
  81. do {                            \
  82.   unsigned char *s;                    \
  83.   int i;                        \
  84.   for (i = 0, s = (unsigned char *)(PTR); i < (LEN); s++, i++)    \
  85.     {                            \
  86.       if ((i % 8) == 0)                    \
  87.     fputs ("\n\t.byte\t", (FILE));            \
  88.       fprintf ((FILE), "%s0x%x", (i%8?",":""), (unsigned)*s); \
  89.     }                            \
  90.   fputs ("\n", (FILE));                    \
  91. } while (0)
  92.