/* Definitions of target machine for gcc for Renesas / SuperH SH using ELF.
- Copyright (C) 1996, 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000, 2001, 2002, 2004, 2005, 2007
+ Free Software Foundation, Inc.
Contributed by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
/* Let sh.c know this is ELF. */
#undef TARGET_ELF
/* Pass -ml and -mrelax to the assembler and linker. */
#undef ASM_SPEC
#define ASM_SPEC SH_ASM_SPEC
-#undef SUBTARGET_ASM_ISA_SPEC
-#define SUBTARGET_ASM_ISA_SPEC "\
-%{m5-compact:--isa=SHcompact} %{m5-compact-nofpu:--isa=SHcompact} \
-%{m5-32media:--isa=SHmedia --abi=32} %{m5-32media-nofpu:--isa=SHmedia --abi=32} \
-%{m5-64media:--isa=SHmedia --abi=64} %{m5-64media-nofpu:--isa=SHmedia --abi=64}"
#undef LINK_SPEC
#define LINK_SPEC SH_LINK_SPEC
#undef LINK_EMUL_PREFIX
-#if TARGET_ENDIAN_DEFAULT == LITTLE_ENDIAN_BIT
+#if TARGET_ENDIAN_DEFAULT == MASK_LITTLE_ENDIAN
#define LINK_EMUL_PREFIX "sh%{!mb:l}elf"
#else
#define LINK_EMUL_PREFIX "sh%{ml:l}elf"
#define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \
sprintf ((STRING), "*%s%s%ld", LOCAL_LABEL_PREFIX, (PREFIX), (long)(NUM))
-#undef ASM_OUTPUT_SOURCE_LINE
-#define ASM_OUTPUT_SOURCE_LINE(file, line, counter) \
-do \
- { \
- asm_fprintf ((file), ".stabn 68,0,%d,%LLM%d-", \
- (line), (counter)); \
- assemble_name ((file), \
- XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\
- asm_fprintf ((file), "\n%LLM%d:\n", (counter)); \
- } \
-while (0)
-
-#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END
-#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \
-do { \
- text_section (); \
- fprintf ((FILE), "\t.stabs \"\",%d,0,0,Letext\nLetext:\n", N_SO); \
-} while (0)
+#define DBX_LINES_FUNCTION_RELATIVE 1
+#define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
#define ENDFILE_SPEC \
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
+#undef LIB_SPEC
+#define LIB_SPEC "-lc"
+
/* ASM_OUTPUT_CASE_LABEL is defined in elfos.h. With it,
a redundant .align was generated. */
#undef ASM_OUTPUT_CASE_LABEL