OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [config/] [sh/] [superh.h] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 709 jeremybenn
/* Definitions of target machine for gcc for Super-H using sh-superh-elf.
2
   Copyright (C) 2001, 2006, 2007, 2011 Free Software Foundation, Inc.
3
 
4
This file is part of GNU CC.
5
 
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 3, or (at your option)
9
any later version.
10
 
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.
15
 
16
You should have received a copy of the GNU General Public License
17
along with GCC; see the file COPYING3.  If not see
18
<http://www.gnu.org/licenses/>.  */
19
 
20
 
21
/* This header file is used when the vendor name is set to 'superh'.
22
   config.gcc already configured the compiler for SH4 only and switched
23
   the default endianess to little (although big endian is still available).
24
   This file configures the spec file to the default board configuration
25
   but in such a way that it can be overridden by a boardspecs file
26
   (using the -specs= option). This file is expected to disable the
27
   defaults and provide options --defsym _start and --defsym _stack
28
   which are required by the SuperH configuration of GNU ld.
29
 
30
   This file is intended to override sh.h.  */
31
 
32
 
33
#ifndef _SUPERH_H
34
#define _SUPERH_H
35
#endif
36
 
37
 
38
/* Override the linker spec strings to use the new emulation
39
   The specstrings are concatenated as follows
40
   LINK_EMUL_PREFIX.(''|'32'|'64'|LINK_DEFAULT_CPU_EMUL).SUBTARGET_LINK_EMUL_SUFFIX
41
*/
42
#undef LINK_EMUL_PREFIX
43
#undef SUBTARGET_LINK_EMUL_SUFFIX
44
 
45
#define LINK_EMUL_PREFIX "superh"
46
#define SUBTARGET_LINK_EMUL_SUFFIX ""
47
 
48
/* Add the SUBTARGET_LINK_SPEC to add the board and runtime support and
49
   change the endianness */
50
#undef SUBTARGET_LINK_SPEC
51
#if  TARGET_ENDIAN_DEFAULT == MASK_LITTLE_ENDIAN
52
#define SUBTARGET_LINK_SPEC "%(board_link) %(ldruntime) %{ml|!mb:-EL}%{mb:-EB}"
53
#else
54
#define SUBTARGET_LINK_SPEC "%(board_link) %(ldruntime) %{ml:-EL}%{mb|!ml:-EB}"
55
#endif
56
 
57
 
58
/* This is used by the link spec if the boardspecs file is not used (for whatever reason).
59
   If the boardspecs file overrides this then an alternative can be used. */
60
#undef SUBTARGET_EXTRA_SPECS
61
#define SUBTARGET_EXTRA_SPECS \
62
{ "board_link", "--defsym _start=0x1000 --defsym _stack=0x30000" }, \
63
{ "asruntime", "" }, \
64
{ "cppruntime", "-D__GDB_SIM__" }, \
65
{ "cc1runtime", "" }, \
66
{ "ldruntime", "" }, \
67
{ "libruntime", "-lc -lgloss" }
68
 
69
 
70
/* Set the SUBTARGET_CPP_SPEC to define __EMBEDDED_CROSS__ which has an effect
71
   on newlib and provide the runtime support */
72
#undef SUBTARGET_CPP_SPEC
73
#define SUBTARGET_CPP_SPEC \
74
"-D__EMBEDDED_CROSS__ %{m4-100*:-D__SH4_100__} %{m4-200*:-D__SH4_200__} %{m4-300*:-D__SH4_300__} %{m4-340:-D__SH4_340__} %{m4-400:-D__SH4_400__} %{m4-500:-D__SH4_500__} \
75
%(cppruntime)"
76
 
77
/* Override the SUBTARGET_ASM_SPEC to add the runtime support */
78
#undef SUBTARGET_ASM_SPEC
79
#define SUBTARGET_ASM_SPEC "%{m4-100*|m4-200*:-isa=sh4} %{m4-400|m4-340:-isa=sh4-nommu-nofpu} %{m4-500:-isa=sh4-nofpu} %(asruntime)"
80
 
81
/* Override the SUBTARGET_ASM_RELAX_SPEC so it doesn't interfere with the
82
   runtime support by adding -isa=sh4 in the wrong place.  */
83
#undef SUBTARGET_ASM_RELAX_SPEC
84
#define SUBTARGET_ASM_RELAX_SPEC "%{!m4-100*:%{!m4-200*:%{!m4-300*:%{!m4-340:%{!m4-400:%{!m4-500:-isa=sh4}}}}}}"
85
 
86
/* Create the CC1_SPEC to add the runtime support */
87
#undef CC1_SPEC
88
#define CC1_SPEC "%(cc1runtime)"
89
 
90
#undef CC1PLUS_SPEC
91
#define CC1PLUS_SPEC "%(cc1runtime)"
92
 
93
 
94
/* Override the LIB_SPEC to add the runtime support */
95
#undef LIB_SPEC
96
#define LIB_SPEC "%{!shared:%{!symbolic:%(libruntime) -lc}} %{pg:-lprofile -lc}"
97
 
98
/* Override STARTFILE_SPEC to add profiling and MMU support.  */
99
#undef STARTFILE_SPEC
100
#define STARTFILE_SPEC \
101
  "%{!shared: %{!m4-400*:%{!m4-340*: %{pg:gcrt1-mmu.o%s}%{!pg:crt1-mmu.o%s}}}} \
102
   %{!shared: %{m4-340*|m4-400*: %{pg:gcrt1.o%s}%{!pg:crt1.o%s}}} \
103
   crti.o%s \
104
   %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.