aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorJ"orn Rennecke <joern.rennecke@superh.com>2002-05-28 22:26:43 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>2002-05-28 23:26:43 +0100
commitf1a58d928b14e74fa54f8be9c12dcc9dd871b073 (patch)
tree95441ed67a475ab09040e20e78a2917ba238f8fa /gcc/config.gcc
parent33a3dfc4f0102fecfc42ef983d3fb3a61f05ec07 (diff)
downloadgcc-f1a58d928b14e74fa54f8be9c12dcc9dd871b073.zip
gcc-f1a58d928b14e74fa54f8be9c12dcc9dd871b073.tar.gz
gcc-f1a58d928b14e74fa54f8be9c12dcc9dd871b073.tar.bz2
config/sh reorganization to factor out endianness and coff:
* config/sh/little.h: New file. * config/sh/sh.h (TARGET_ENDIAN_DEFAULT): If not already defined, define to 0 to select big-endian. (SUBTARGET_ASM_ENDIAN_SPEC): Define according to TARGET_ENDIAN_DEFAULT. (TARGET_DEFAULT): Include TARGET_ENDIAN_DEFAULT. * config/sh/sh64.h (TARGET_DEFAULT): Include TARGET_ENDIAN_DEFAULT. * config/sh/t-be: New file. * config/sh/t-le: New file. * sh.h (SDB_DEBUGGING_INFO, #include "dbxcoff.h"): Moved to sh/coff.h. (SDB_DELIM, MAX_OFILE_ALIGNMENT, IDENT_ASM_OP): Likewise. (TARGET_ASM_NAMED_SECTION, ASM_OUTPUT_SKIP): Likewise. (USER_LABEL_PREFIX, LOCAL_LABEL_PREFIX): Likewise. (ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_INTERNAL_LABEL): Likewise. (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Likewise. (ASM_FILE_END, ASM_DECLARE_FUNCTION_NAME): Deleted. (CPP_SPEC, SUBTARGET_CPP_ENDIAN_SPEC): Likewise. (SUBTARGET_CPP_SPEC, CPP_DEFAULT_CPU_SPEC, CPP_PREDEFINES): Likewise. (EXTRA_SPECS): Remove SUBTARGET_CPP_ENDIAN_SPEC and CPP_DEFAULT_CPU_SPEC. Add LINK_EMUL_PREFIX, LINK_DEFAULT_CPU_EMUL, SUBTARGET_LINK_EMUL_SUFFIX and SUBTARGET_LINK_SPEC. (LINK_SPEC): Define to SH_LINK_SPEC. (TARGET_CPU_CPP_BUILTINS, SH_LINK_SPEC): Define. (LINK_EMUL_PREFIX, LINK_DEFAULT_CPU_EMUL): Likewise. (SUBTARGET_LINK_EMUL_SUFFIX, SUBTARGET_LINK_SPEC): Likewise. (CPP_SPEC): Reduce to %(subtarget_cpp_spec). (TARGET_ENDIAN_DEFAULT): Define if not already defined. * config/sh/coff.h: New file. (TARGET_ASM_NAMED_SECTION): Now default_coff_asm_named_section (TARGET_OBJFMT_CPP_BUILTINS): Define. * config/sh/elf.h (IDENT_ASM_OP): No need to #undef at the start. (ASM_FILE_END, ASM_OUTPUT_SOURCE_LINE): Likewise. (DBX_OUTPUT_MAIN_SOURCE_FILE_END, TARGET_ASM_NAMED_SECTION): Likewise. (ASM_DECLARE_FUNCTION_NAME, MAX_OFILE_ALIGNMENT, SIZE_TYPE): Likewise. (PTRDIFF_TYPE): Likewise. ("dbxelf.h", "elfos.h", "svr4.h"): Don't #include. (CPP_PREDEFINES): Don't define. (TARGET_OBJFMT_CPP_BUILTINS): Define. (LINK_SPEC): Define to SH_LINK_SPEC. (LINK_EMUL_PREFIX): Redefine. * config/sh/linux.h: (SUBTARGET_CPP_SPEC): Remove -fpic / -fPIC cases. (SUBTARGET_CPP_ENDIAN_SPEC, CPP_DEFAULT_CPU_SPEC): Remove redefinition. (CPP_PREDEFINES, SUBTARGET_ASM_ENDIAN_SPEC): Likewise. (CC1_SPEC, CC1PLUS_SPEC, LINK_SPEC): Likewise. (TARGET_OS_CPP_BUILTINS): Define. (TARGET_DEFAULT): Redefine. (SUBTARGET_LINK_EMUL_SUFFIX, SUBTARGET_LINK_SPEC): Likewise. * config/sh/sh64.h (CPP_DEFAULT_CPU_SPEC): Remove. (LINK_SPEC): Don't redefine. (LINK_DEFAULT_CPU_EMUL): Redefine. (TARGET_DEFAULT): Include TARGET_ENDIAN_DEFAULT. * sh.c (sh_asm_named_section): Don't declare / define. * t-linux (MULTILIB_OPTIONS): Rely on pre-set endianness option. * config.gcc (sh-*-elf* tm_file): Add dbxelf.h elfos.h svr4.h. (sh64-*-elf* tm_file): Likewise. (sh-*-rtemself* tm_file): Likewise. (sh-*-linux* tm_file): Likewise. Add sh/little.h. (sh-*-linux* tmake_file): Add sh/t-le. (sh-*-rtems* tm_file): Add sh/coff.h (sh-*-* tm_file): Likewise. * sh.h (LEGITIMATE_PIC_OPERAND_P): Check for SYMBOL_REF before using CONSTANT_POOL_ADDRESS_P. * coff.h (HAS_INIT_SECTION, INVOKE__MAIN): Define. Co-Authored-By: Jason R. Thorpe <thorpej@wasabisystems.com> From-SVN: r53974
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r--gcc/config.gcc13
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc
index de376c7..6ba0de6 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2207,12 +2207,12 @@ s390x-*-linux*)
;;
sh-*-elf*)
tmake_file="sh/t-sh sh/t-elf"
- tm_file="${tm_file} sh/embed-elf.h"
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/embed-elf.h"
float_format=sh
;;
sh64-*-elf*)
tmake_file="sh/t-sh sh/t-elf sh/t-sh64"
- tm_file="${tm_file} sh/sh.h sh/embed-elf.h sh/sh64.h"
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/embed-elf.h sh/sh64.h"
float_format=sh
extra_headers="shmedia.h ushmedia.h sshmedia.h"
# Not strictly necessary to check this, but a good idea anyway.
@@ -2223,7 +2223,7 @@ sh64-*-elf*)
sh-*-rtemself*)
xm_defines=POSIX
tmake_file="sh/t-sh sh/t-elf t-rtems"
- tm_file="${tm_file} sh/embed-elf.h sh/rtemself.h rtems.h"
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/embed-elf.h sh/rtemself.h rtems.h"
float_format=sh
if test x$enable_threads = xyes; then
thread_file='rtems'
@@ -2232,15 +2232,15 @@ sh-*-rtemself*)
sh-*-rtems*)
xm_defines=POSIX
tmake_file="sh/t-sh t-rtems"
- tm_file="${tm_file} sh/rtems.h rtems.h"
+ tm_file="${tm_file} sh/coff.h sh/rtems.h rtems.h"
float_format=sh
if test x$enable_threads = xyes; then
thread_file='rtems'
fi
;;
sh-*-linux*)
- tm_file="${tm_file} sh/elf.h sh/linux.h"
- tmake_file="sh/t-sh sh/t-elf sh/t-linux"
+ tm_file="sh/little.h ${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/linux.h"
+ tmake_file="sh/t-sh sh/t-elf sh/t-le sh/t-linux"
gas=yes gnu_ld=yes
if test x$enable_threads = xyes; then
thread_file='posix'
@@ -2248,6 +2248,7 @@ sh-*-linux*)
float_format=sh
;;
sh-*-*)
+ tm_file="${tm_file} sh/coff.h"
float_format=sh
;;
sparc-tti-*)