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