1 |
38 |
julius |
/* Definitions for Rs6000 running LynxOS.
|
2 |
|
|
Copyright (C) 1995, 1996, 2000, 2002, 2003, 2004, 2005, 2007
|
3 |
|
|
Free Software Foundation, Inc.
|
4 |
|
|
Contributed by David Henkel-Wallace, Cygnus Support (gumby@cygnus.com)
|
5 |
|
|
Rewritten by Adam Nemet, LynuxWorks Inc.
|
6 |
|
|
|
7 |
|
|
This file is part of GCC.
|
8 |
|
|
|
9 |
|
|
GCC is free software; you can redistribute it and/or modify it
|
10 |
|
|
under the terms of the GNU General Public License as published
|
11 |
|
|
by the Free Software Foundation; either version 3, or (at your
|
12 |
|
|
option) any later version.
|
13 |
|
|
|
14 |
|
|
GCC is distributed in the hope that it will be useful, but WITHOUT
|
15 |
|
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
16 |
|
|
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
17 |
|
|
License for more details.
|
18 |
|
|
|
19 |
|
|
You should have received a copy of the GNU General Public License
|
20 |
|
|
along with GCC; see the file COPYING3. If not see
|
21 |
|
|
<http://www.gnu.org/licenses/>. */
|
22 |
|
|
|
23 |
|
|
/* Override the definition in sysv4.h. */
|
24 |
|
|
|
25 |
|
|
#undef TARGET_VERSION
|
26 |
|
|
#define TARGET_VERSION fputs (" (PowerPC/LynxOS)", stderr);
|
27 |
|
|
|
28 |
|
|
/* Undefine the definition to enable the LynxOS default from the
|
29 |
|
|
top-level lynx.h. */
|
30 |
|
|
|
31 |
|
|
#undef SUBTARGET_EXTRA_SPECS
|
32 |
|
|
|
33 |
|
|
/* Get rid off the spec definitions from rs6000/sysv4.h. */
|
34 |
|
|
|
35 |
|
|
#undef CPP_SPEC
|
36 |
|
|
#define CPP_SPEC \
|
37 |
|
|
"%{msoft-float: -D_SOFT_FLOAT} \
|
38 |
|
|
%(cpp_cpu) \
|
39 |
|
|
%(cpp_os_lynx)"
|
40 |
|
|
|
41 |
|
|
/* LynxOS only supports big-endian on PPC so we override the
|
42 |
|
|
definition from sysv4.h. Since the LynxOS 4.0 compiler was set to
|
43 |
|
|
return every structure in memory regardless of their size we have
|
44 |
|
|
to emulate the same behavior here with disabling the SVR4 structure
|
45 |
|
|
returning. */
|
46 |
|
|
|
47 |
|
|
#undef CC1_SPEC
|
48 |
|
|
#define CC1_SPEC \
|
49 |
|
|
"%{G*} %{mno-sdata:-msdata=none} \
|
50 |
|
|
%{maltivec:-mabi=altivec} \
|
51 |
|
|
-maix-struct-return"
|
52 |
|
|
|
53 |
|
|
#undef ASM_SPEC
|
54 |
|
|
#define ASM_SPEC \
|
55 |
|
|
"%(asm_cpu) \
|
56 |
|
|
%{.s: %{mregnames} %{mno-regnames}} \
|
57 |
|
|
%{.S: %{mregnames} %{mno-regnames}}"
|
58 |
|
|
|
59 |
|
|
#undef STARTFILE_SPEC
|
60 |
|
|
#undef ENDFILE_SPEC
|
61 |
|
|
#undef LIB_SPEC
|
62 |
|
|
#undef LINK_SPEC
|
63 |
|
|
#define LINK_SPEC \
|
64 |
|
|
"%{!msdata=none:%{G*}} %{msdata=none:-G0} \
|
65 |
|
|
%(link_os_lynx)"
|
66 |
|
|
|
67 |
|
|
/* Override the definition from sysv4.h. */
|
68 |
|
|
|
69 |
|
|
#undef TARGET_OS_CPP_BUILTINS
|
70 |
|
|
#define TARGET_OS_CPP_BUILTINS() \
|
71 |
|
|
do \
|
72 |
|
|
{ \
|
73 |
|
|
builtin_define ("__BIG_ENDIAN__"); \
|
74 |
|
|
builtin_define ("__powerpc__"); \
|
75 |
|
|
builtin_assert ("cpu=powerpc"); \
|
76 |
|
|
builtin_assert ("machine=powerpc"); \
|
77 |
|
|
builtin_define ("__PPC__"); \
|
78 |
|
|
} \
|
79 |
|
|
while (0)
|
80 |
|
|
|
81 |
|
|
/* Override the rs6000.h definition. */
|
82 |
|
|
|
83 |
|
|
#undef ASM_APP_ON
|
84 |
|
|
#define ASM_APP_ON "#APP\n"
|
85 |
|
|
|
86 |
|
|
/* Override the rs6000.h definition. */
|
87 |
|
|
|
88 |
|
|
#undef ASM_APP_OFF
|
89 |
|
|
#define ASM_APP_OFF "#NO_APP\n"
|
90 |
|
|
|
91 |
|
|
/* LynxOS does not do anything with .fixup plus let's not create
|
92 |
|
|
writable section for linkonce.r and linkonce.t. */
|
93 |
|
|
|
94 |
|
|
#undef RELOCATABLE_NEEDS_FIXUP
|
95 |
|
|
|
96 |
|
|
/* Override these from rs6000.h with the generic definition. */
|
97 |
|
|
|
98 |
|
|
#undef SIZE_TYPE
|
99 |
|
|
#undef ASM_OUTPUT_ALIGN
|
100 |
|
|
#undef PREFERRED_DEBUGGING_TYPE
|
101 |
|
|
|
102 |
|
|
/* The file rs6000.c defines TARGET_HAVE_TLS unconditionally to the
|
103 |
|
|
value of HAVE_AS_TLS. HAVE_AS_TLS is true as gas support for TLS
|
104 |
|
|
is detected by configure. Override the definition to false. */
|
105 |
|
|
|
106 |
|
|
#undef HAVE_AS_TLS
|
107 |
|
|
#define HAVE_AS_TLS 0
|
108 |
|
|
|
109 |
|
|
#ifdef CRT_BEGIN
|
110 |
|
|
/* This function is part of crtbegin*.o which is at the beginning of
|
111 |
|
|
the link and is called from .fini which is usually toward the end
|
112 |
|
|
of the executable. Make it longcall so that we don't limit the
|
113 |
|
|
text size of the executables to 32M. */
|
114 |
|
|
|
115 |
|
|
static void __do_global_dtors_aux (void) __attribute__ ((longcall));
|
116 |
|
|
#endif /* CRT_BEGIN */
|
117 |
|
|
|
118 |
|
|
#ifdef CRT_END
|
119 |
|
|
/* Similarly here. This function resides in crtend*.o which is toward
|
120 |
|
|
to end of the link and is called from .init which is at the
|
121 |
|
|
beginning. */
|
122 |
|
|
|
123 |
|
|
static void __do_global_ctors_aux (void) __attribute__ ((longcall));
|
124 |
|
|
#endif /* CRT_END */
|