1/* Definitions for Rs6000 running LynxOS. 2 Copyright (C) 1995-2020 Free Software Foundation, Inc. 3 Contributed by David Henkel-Wallace, Cygnus Support (gumby@cygnus.com) 4 Rewritten by Adam Nemet, LynuxWorks Inc. 5 6 This file is part of GCC. 7 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 10 by the Free Software Foundation; either version 3, or (at your 11 option) any later version. 12 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. 17 18 You should have received a copy of the GNU General Public License 19 along with GCC; see the file COPYING3. If not see 20 <http://www.gnu.org/licenses/>. */ 21 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. */ 28 29#undef CPP_SPEC 30#define CPP_SPEC \ 31"%{msoft-float: -D_SOFT_FLOAT} \ 32 %(cpp_cpu) \ 33 %(cpp_os_lynx)" 34 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. */ 40 41#undef CC1_SPEC 42#define CC1_SPEC \ 43"%{G*} %{mno-sdata:-msdata=none} \ 44 %{maltivec:-mabi=altivec} \ 45 -maix-struct-return" 46 47#undef ASM_SPEC 48#define ASM_SPEC \ 49"%(asm_cpu) \ 50 %{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}}" 51 52#undef STARTFILE_SPEC 53#undef ENDFILE_SPEC 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 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. */ 88 89#undef HAVE_AS_TLS 90#define HAVE_AS_TLS 0 91 92/* Use standard DWARF numbering for DWARF debugging information. */ 93#define RS6000_USE_DWARF_NUMBERING 94 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 */ 111