#undef TARGET_IRIX
#define TARGET_IRIX 1
#undef TARGET_IRIX5
#define TARGET_IRIX5 1
#define ABICALLS_ASM_OP "\t.option pic2"
#define BSS_SECTION_ASM_OP "\t.data"
#define OBJECT_FORMAT_ELF
#define HAS_INIT_SECTION
#define LD_INIT_SWITCH "-init"
#define LD_FINI_SWITCH "-fini"
#define SWITCHES_NEED_SPACES "o"
#undef WCHAR_TYPE
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE "int"
#define WCHAR_TYPE_SIZE INT_TYPE_SIZE
#undef DEFAULT_SIGNED_CHAR
#define DEFAULT_SIGNED_CHAR 0
#define WORD_SWITCH_TAKES_ARG(STR) \
(DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \
|| !strcmp (STR, "rpath"))
#define TARGET_OS_CPP_BUILTINS() \
do { \
builtin_define_std ("host_mips"); \
builtin_define_std ("sgi"); \
builtin_define_std ("unix"); \
builtin_define_std ("SYSTYPE_SVR4"); \
builtin_define ("_LONGLONG"); \
builtin_define ("_MODERN_C"); \
builtin_define ("_SVR4_SOURCE"); \
builtin_define ("__DSO__"); \
builtin_define ("_ABIO32=1"); \
builtin_define ("_MIPS_SIM=_ABIO32"); \
builtin_define ("_MIPS_SZPTR=32"); \
builtin_assert ("system=unix"); \
builtin_assert ("system=svr4"); \
builtin_assert ("machine=sgi"); \
\
if (!TARGET_FLOAT64) \
builtin_define ("_MIPS_FPSET=16"); \
else \
builtin_define ("_MIPS_FPSET=32"); \
\
if (!TARGET_INT64) \
builtin_define ("_MIPS_SZINT=32"); \
else \
builtin_define ("_MIPS_SZINT=64"); \
\
if (!TARGET_LONG64) \
builtin_define ("_MIPS_SZLONG=32"); \
else \
builtin_define ("_MIPS_SZLONG=64"); \
\
if (!flag_iso) \
{ \
builtin_define ("__EXTENSIONS__"); \
builtin_define ("_SGI_SOURCE"); \
} \
} while (0);
#undef SUBTARGET_CC1_SPEC
#define SUBTARGET_CC1_SPEC "%{static: -mno-abicalls}"
#undef SUBTARGET_ASM_OPTIMIZING_SPEC
#define SUBTARGET_ASM_OPTIMIZING_SPEC "\
%{noasmopt:-O0} \
%{!noasmopt:%{O|O1|O2|O3:-O2}}"
#undef LINK_SPEC
#define LINK_SPEC "\
%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \
%{bestGnum} %{shared} %{non_shared} \
%{call_shared} %{no_archive} %{exact_version} \
%{static: -non_shared} \
%{!static: \
%{!shared:%{!non_shared:%{!call_shared: -call_shared -no_unresolved}}}} \
%{rpath} \
-_SYSTYPE_SVR4"
#define IRIX_STARTFILE_SPEC "\
%{!static: \
%{!shared:%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}}} \
%{static: \
%{pg:gcrt1.o%s} \
%{!pg:%{p:/usr/lib/nonshared/mcrt1.o%s libprof1.a%s} \
%{!p:/usr/lib/nonshared/crt1.o%s}}}"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "%(irix_startfile_spec)"
#undef LIB_SPEC
#define LIB_SPEC "%{!shared:%{p:-lprof1} %{pg:-lprof1} -lc}"
#define IRIX_ENDFILE_SPEC "%{!shared:crtn.o%s}"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "%(irix_endfile_spec)"
#undef ASM_FINAL_SPEC
#define NO_IMPLICIT_EXTERN_C 1
#undef DBX_DEBUGGING_INFO
#undef MIPS_DEBUGGING_INFO
#undef PREFERRED_DEBUGGING_TYPE
#define DWARF2_UNWIND_INFO 0
#undef MACHINE_TYPE
#define MACHINE_TYPE "SGI running IRIX 5.x"
#undef SET_FILE_NUMBER
#define SET_FILE_NUMBER() num_source_filenames = 1
#undef LABEL_AFTER_LOC
#define LABEL_AFTER_LOC(STREAM) fprintf (STREAM, "LM%d:\n", ++sym_lineno)
#undef DOLLARS_IN_IDENTIFIERS
#undef NO_DOLLAR_IN_LABEL
#undef MIPS_DEFAULT_GVALUE
#define MIPS_DEFAULT_GVALUE 0
#undef TARGET_ASM_NAMED_SECTION
#define TARGET_ASM_NAMED_SECTION irix_asm_named_section
#undef EXTRA_SECTION_FUNCTIONS
#define EXTRA_SECTION_FUNCTIONS \
const char * \
current_section_name (void) \
{ \
switch (in_section) \
{ \
case no_section: return NULL; \
case in_unlikely_executed_text: \
case in_text: return ".text"; \
case in_data: return ".data"; \
case in_bss: return ".bss"; \
case in_readonly_data: \
if (mips_abi != ABI_32 && mips_abi != ABI_O64) \
return ".rodata"; \
else \
return ".rdata"; \
case in_named: \
return in_named_name; \
default: abort(); \
} \
} \
\
unsigned int \
current_section_flags (void) \
{ \
switch (in_section) \
{ \
case no_section: return 0; \
case in_unlikely_executed_text: \
case in_text: return SECTION_CODE; \
case in_data: return SECTION_WRITE; \
case in_bss: return SECTION_WRITE | SECTION_BSS; \
case in_readonly_data: return 0; \
case in_named: return get_named_section_flags (in_named_name); \
default: abort (); \
} \
}
#undef ASM_OUTPUT_ASCII
#define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \
do { \
const unsigned char *s_ = (const unsigned char *)(PTR); \
unsigned len_ = (LEN); \
unsigned i_; \
mips_output_ascii (FILE, (const char *) s_, len_, "\t# "); \
for (i_ = 0; i_ < len_; s_++, i_++) \
{ \
if ((i_ % 8) == 0) \
fputs ("\n\t.byte\t", (FILE)); \
fprintf ((FILE), "%s0x%x", (i_%8?",":""), *s_); \
} \
fputs ("\n", (FILE)); \
} while (0)
#undef TARGET_ASM_EXTERNAL_LIBCALL
#define TARGET_ASM_EXTERNAL_LIBCALL irix_output_external_libcall
#define ASM_DECLARE_FUNCTION_SIZE(STREAM, NAME, DECL) \
do { \
tree name_tree = get_identifier (NAME); \
TREE_ASM_WRITTEN (name_tree) = 1; \
} while (0)
#define ASM_OUTPUT_WEAK_ALIAS(FILE, NAME, VALUE) \
do \
{ \
(*targetm.asm_out.globalize_label) (FILE, NAME); \
fputs ("\t.weakext\t", FILE); \
assemble_name (FILE, NAME); \
if (VALUE) \
{ \
fputc (' ', FILE); \
assemble_name (FILE, VALUE); \
} \
fputc ('\n', FILE); \
} \
while (0)
#define ASM_WEAKEN_LABEL(FILE, NAME) ASM_OUTPUT_WEAK_ALIAS(FILE, NAME, 0)
#define HANDLE_SYSV_PRAGMA 1
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
{ "irix_startfile_spec", IRIX_STARTFILE_SPEC }, \
{ "irix_endfile_spec", IRIX_ENDFILE_SPEC },