* alias.c, c-common.h, c-incpath.c, c-incpath.h, expr.c,
[official-gcc.git] / gcc / config / mn10300 / linux.h
blob0130498ce5ad1e56fccc8f53fdef5ba90ea12ab7
1 /* Definitions of taret machine for GNU compiler.
2 Matsushita AM33/2.0
3 Copyright 2001, 2002 Free Software Foundation, Inc.
4 Contributed by Alexandre Oliva <aoliva@redhat.com>
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
11 any later version.
13 GCC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING. If not, write to
20 the Free Software Foundation, 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 #undef PREFERRED_DEBUGGING_TYPE
24 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
26 #define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
28 #undef CPP_SPEC
29 #define CPP_SPEC "%{mam33:-D__AM33__} %{!mam33:-D__AM33__=2 -D__AM33_2__} \
30 %{posix:-D_POSIX_SOURCE} \
31 %{pthread:-D_REENTRANT -D_PTHREADS}"
33 #undef ASM_SPEC
34 #define ASM_SPEC "%{Wa,*:%*}"
36 #undef LINK_SPEC
37 #define LINK_SPEC "%{mrelax:--relax} %{shared:-shared} \
38 %{!static: \
39 %{rdynamic:-export-dynamic} \
40 %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
41 %{static:-static}"
43 #undef LIB_SPEC
44 #define LIB_SPEC \
45 "%{shared: -lc} \
46 %{!static:-rpath-link %R/lib:%R/usr/lib} \
47 %{!shared: %{pthread:-lpthread} \
48 %{profile:-lc_p} %{!profile: -lc}}"
50 #undef STARTFILE_SPEC
51 #define STARTFILE_SPEC \
52 "%{!shared: \
53 %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
54 %{!p:%{profile:gcrt1.o%s} \
55 %{!profile:crt1.o%s}}}} \
56 crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
58 #undef TARGET_SWITCHES
59 #define TARGET_SWITCHES \
60 {{ "am33", -0x4, N_("Target the AM33 processor") }, \
61 { "am33-2", 6, N_("Target the AM33/2.0 processor") }, \
62 { "relax", 0, N_("Enable linker relaxations") }, \
63 { "", TARGET_DEFAULT, NULL }}
65 #undef TARGET_DEFAULT
66 #define TARGET_DEFAULT 6
68 #undef TARGET_VERSION
69 #define TARGET_VERSION fprintf (stderr, " (AM33/2.0 GNU/Linux)");
71 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
73 extern int mn10300_protect_label;
75 #undef PRINT_OPERAND
76 #define PRINT_OPERAND(FILE, X, CODE) \
77 do \
78 { \
79 mn10300_protect_label = 1; \
80 print_operand ((FILE), (X), (CODE)); \
81 mn10300_protect_label = 0; \
82 } \
83 while (0)
85 #undef PRINT_OPERAND_ADDRESS
86 #define PRINT_OPERAND_ADDRESS(FILE, X) \
87 do \
88 { \
89 mn10300_protect_label = 1; \
90 print_operand_address ((FILE), (X)); \
91 mn10300_protect_label = 0; \
92 } \
93 while (0)
95 #undef ASM_OUTPUT_LABELREF
96 #define ASM_OUTPUT_LABELREF(FILE, NAME) \
97 do \
98 { \
99 const char * real_name; \
101 real_name = (*targetm.strip_name_encoding) (NAME); \
102 if (mn10300_protect_label) \
103 asm_fprintf (FILE, "+"); \
104 asm_fprintf (FILE, "%U%s", real_name); \
106 while (0)