diff options
Diffstat (limited to 'gcc/config/sh/superh.h')
| -rw-r--r-- | gcc/config/sh/superh.h | 69 |
1 files changed, 13 insertions, 56 deletions
diff --git a/gcc/config/sh/superh.h b/gcc/config/sh/superh.h index f4807d8..7ac96ef 100644 --- a/gcc/config/sh/superh.h +++ b/gcc/config/sh/superh.h @@ -1,5 +1,5 @@ /* Definitions of target machine for gcc for Super-H using sh-superh-elf. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2006 Free Software Foundation, Inc. This file is part of GNU CC. @@ -20,9 +20,9 @@ Boston, MA 02110-1301, USA. */ /* This header file is used when the vendor name is set to 'superh'. - It configures the compiler for SH4 only and switches the default - endianess to little (although big endian is still available). - It also configures the spec file to the default board configuration + config.gcc already configured the compiler for SH4 only and switched + the default endianess to little (although big endian is still available). + This file configures the spec file to the default board configuration but in such a way that it can be overridden by a boardspecs file (using the -specs= option). This file is expected to disable the defaults and provide options --defsym _start and --defsym _stack @@ -39,57 +39,6 @@ Boston, MA 02110-1301, USA. */ #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (SuperH SH special %s)", __DATE__); - -/* We override TARGET_PROCESSOR_SWITCHES in order to remove all the unrequired cpu options - and add options for all the SuperH CPU variants: - -m4-100 is an alias for -m4. - -m4-200 is an alias for -m4. - -m4-400 is an alias for -m4-nofpu and passes -isa=sh4-nommu-nofpu to the assembler. - -m4-500 is an alias for -m4-nofpu and passes -isa=sh4-nofpu to the assembler. */ -#undef TARGET_PROCESSOR_SWITCHES -#define TARGET_PROCESSOR_SWITCHES \ - {"4-500", TARGET_NONE, "SH4 500 series (FPU-less)" }, \ - {"4-500", SELECT_SH4_NOFPU, "" }, \ - {"4-400", TARGET_NONE, "SH4 400 series (MMU/FPU-less)" }, \ - {"4-400", SELECT_SH4_NOFPU, "" }, \ - {"4-200-single-only", TARGET_NONE, "SH4 200 series with double = float (SH3e ABI)" }, \ - {"4-200-single-only", SELECT_SH4_SINGLE_ONLY, "" }, \ - {"4-200-single", TARGET_NONE, "SH4 200 series with single precision pervading" }, \ - {"4-200-single", SELECT_SH4_SINGLE, "" }, \ - {"4-200-nofpu", TARGET_NONE, "SH4 200 series using soft floating point" }, \ - {"4-200-nofpu", SELECT_SH4_NOFPU, "" }, \ - {"4-200", TARGET_NONE, "SH4 200 series" }, \ - {"4-200", SELECT_SH4_NOFPU, "" }, \ - {"4-100-single-only", TARGET_NONE, "SH4 100 series with double = float (SH3e ABI)" }, \ - {"4-100-single-only", SELECT_SH4_SINGLE_ONLY, "" }, \ - {"4-100-single", TARGET_NONE, "SH4 100 series with single precision pervading" }, \ - {"4-100-single", SELECT_SH4_SINGLE, "" }, \ - {"4-100-nofpu", TARGET_NONE, "SH4 100 series using soft floating point" }, \ - {"4-100-nofpu", SELECT_SH4_NOFPU, "" }, \ - {"4-100", TARGET_NONE, "SH4 100 series" }, \ - {"4-100", SELECT_SH4_NOFPU, "" }, \ - {"4-single-only", TARGET_NONE, "Generic SH4 with double = float (SH3e ABI)" }, \ - {"4-single-only", SELECT_SH4_SINGLE_ONLY, "" }, \ - {"4-single", TARGET_NONE, "Generic SH4 with single precision pervading" }, \ - {"4-single", SELECT_SH4_SINGLE, "" }, \ - {"4-nofpu", TARGET_NONE, "Generic SH4 using soft floating point" }, \ - {"4-nofpu", SELECT_SH4_NOFPU, "" }, \ - {"4", TARGET_NONE, "Generic SH4 (default)" }, \ - {"4", SELECT_SH4, "" } - - -/* Provide the -mboard= option used by the boardspecs file */ -#undef SUBTARGET_OPTIONS -#define SUBTARGET_OPTIONS \ - { "board=", &boardtype, "Board name [and momory region].", 0 }, \ - { "runtime=", &osruntime, "Runtime name.", 0 }, \ - -/* These are required by the mboard= option and runtime= option - and are defined in sh.c but are not used anywhere */ -extern const char * boardtype; -extern const char * osruntime; - - /* Override the linker spec strings to use the new emulation The specstrings are concatenated as follows LINK_EMUL_PREFIX.(''|'32'|'64'|LINK_DEFAULT_CPU_EMUL).SUBTARGET_LINK_EMUL_SUFFIX @@ -103,7 +52,7 @@ extern const char * osruntime; /* Add the SUBTARGET_LINK_SPEC to add the board and runtime support and change the endianness */ #undef SUBTARGET_LINK_SPEC -#if TARGET_ENDIAN_DEFAULT == LITTLE_ENDIAN_BIT +#if TARGET_ENDIAN_DEFAULT == MASK_LITTLE_ENDIAN #define SUBTARGET_LINK_SPEC "%(board_link) %(ldruntime) %{ml|!mb:-EL}%{mb:-EB}" #else #define SUBTARGET_LINK_SPEC "%(board_link) %(ldruntime) %{ml:-EL}%{mb|!ml:-EB}" @@ -149,3 +98,11 @@ extern const char * osruntime; /* Override the LIB_SPEC to add the runtime support */ #undef LIB_SPEC #define LIB_SPEC "%{!shared:%{!symbolic:%(libruntime) -lc}} %{pg:-lprofile -lc}" + +/* Override STARTFILE_SPEC to add profiling and MMU support. */ +#undef STARTFILE_SPEC +#define STARTFILE_SPEC \ + "%{!shared: %{!m4-400*: %{pg:gcrt1-mmu.o%s}%{!pg:crt1-mmu.o%s}}} \ + %{!shared: %{m4-400*: %{pg:gcrt1.o%s}%{!pg:crt1.o%s}}} \ + crti.o%s \ + %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" |
