Declare malloc, free, and atexit if inhibit_libc is defined.
[official-gcc.git] / gcc / config / mips / gnu.h
blob734548b52115c41a585eb1dc79a296c14a835703
1 /* Definitions of target machine for GNU compiler. MIPS GNU Hurd version.
2 Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
4 This file is part of GNU CC.
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.
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.
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. */
21 #define TARGET_DEFAULT MASK_GAS
23 #include <mips/mips.h>
25 #undef SWITCH_TAKES_ARG
26 #undef ASM_FILE_END
27 #undef ASM_OUTPUT_IDENT
28 #undef ASM_OUTPUT_SOURCE_LINE
29 #undef READONLY_DATA_SECTION
30 #undef SELECT_SECTION
31 #undef ASM_DECLARE_FUNCTION_NAME
32 #undef ASM_DECLARE_OBJECT_NAME
33 /* #undef PREFERRED_DEBUGGING_TYPE */
35 #include <svr4.h>
37 #undef MD_EXEC_PREFIX
38 #undef MD_STARTFILE_PREFIX
39 #undef TARGET_VERSION
40 #define TARGET_VERSION fprintf (stderr, " (MIPS GNU/ELF)");
42 /* Output at beginning of assembler file. */
43 /* The .file command should always begin the output. */
44 #undef ASM_FILE_START
45 #define ASM_FILE_START(FILE) \
46 do { \
47 mips_asm_file_start (FILE); \
48 fprintf (FILE, "\t.version\t\"01.01\"\n"); \
49 } while (0)
51 #undef ASM_FILE_END
52 #define ASM_FILE_END(FILE) \
53 do { \
54 mips_asm_file_end(FILE); \
55 if (!flag_no_ident) \
56 fprintf ((FILE), "\t%s\t\"GCC: (GNU) %s\"\n", \
57 IDENT_ASM_OP, version_string); \
58 } while (0)
60 #undef ASM_OUTPUT_SOURCE_LINE
61 #define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \
62 do { \
63 ++sym_lineno; \
64 fprintf ((FILE), ".LM%d:\n\t%s %d,0,%d,.LM%d\n", \
65 sym_lineno, ASM_STABN_OP, N_SLINE, (LINE), sym_lineno); \
66 } while (0)
68 #undef ASM_DECLARE_FUNCTION_NAME
69 #define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
70 do { \
71 extern FILE *asm_out_text_file; \
73 if (TARGET_GP_OPT) \
74 STREAM = asm_out_text_file; \
75 fprintf (STREAM, "\t%s\t ", TYPE_ASM_OP); \
76 assemble_name (STREAM, NAME); \
77 putc (',', STREAM); \
78 fprintf (STREAM, TYPE_OPERAND_FMT, "function"); \
79 putc ('\n', STREAM); \
80 ASM_DECLARE_RESULT (STREAM, DECL_RESULT (DECL)); \
81 HALF_PIC_DECLARE (NAME); \
82 } while (0)
84 /* Switch Recognition by gcc.c. Add -G xx support */
85 #undef SWITCH_TAKES_ARG
86 #define SWITCH_TAKES_ARG(CHAR) \
87 (DEFAULT_SWITCH_TAKES_ARG(CHAR) || (CHAR) == 'G')
89 #undef DEFAULT_PCC_STRUCT_RETURN
90 #define DEFAULT_PCC_STRUCT_RETURN 1
92 #undef DBX_REGISTER_NUMBER
93 #define DBX_REGISTER_NUMBER(REGNO) mips_dbx_regno[ (REGNO) ]
95 #define MIPS_GNU
97 #undef CPP_PREDEFINES
98 #define CPP_PREDEFINES "-Dmips -Acpu(mips) -Amachine(mips) \
99 -Dunix -Asystem(unix) -DMACH -Asystem(mach) -D__GNU__ -Asystem(gnu) \
100 -DMIPSEB -DR3000 -D_MIPSEB -D_R3000 \
101 -D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32"
103 #undef LINK_SPEC
104 #define LINK_SPEC "\
105 %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \
106 %{bestGnum} %{shared} %{non_shared} \
107 %{call_shared} %{no_archive} %{exact_version} \
108 %{!shared: %{!non_shared: %{!call_shared: -non_shared}}} \
109 -systype /gnu/ "
111 #undef LIB_SPEC
112 #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s"
114 #undef STARTFILE_SPEC
115 #define STARTFILE_SPEC "%{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}} %{static:-static}"
117 #undef MACHINE_TYPE
118 #define MACHINE_TYPE "GNU MIPS/ELF"
120 #undef YES_UNDERSCORE
122 #undef SDB_DEBUGGING_INFO
123 #undef DBX_DEBUGGING_INFO
124 #undef MIPS_DEBUGGING_INFO
125 #define DWARF_DEBUGGING_INFO
127 #define NO_MIPS_SELECT_SECTION
129 /* Get machine-independent configuration parameters for the GNU system. */
130 #include <gnu.h>