1*404b540aSrobert /* Target independent definitions for LynxOS. 2*404b540aSrobert Copyright (C) 1993, 1994, 1995, 1996, 1999, 2000, 2002, 2003, 2004 3*404b540aSrobert Free Software Foundation, Inc. 4*404b540aSrobert 5*404b540aSrobert This file is part of GCC. 6*404b540aSrobert 7*404b540aSrobert GCC is free software; you can redistribute it and/or modify 8*404b540aSrobert it under the terms of the GNU General Public License as published by 9*404b540aSrobert the Free Software Foundation; either version 2, or (at your option) 10*404b540aSrobert any later version. 11*404b540aSrobert 12*404b540aSrobert GCC is distributed in the hope that it will be useful, 13*404b540aSrobert but WITHOUT ANY WARRANTY; without even the implied warranty of 14*404b540aSrobert MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15*404b540aSrobert GNU General Public License for more details. 16*404b540aSrobert 17*404b540aSrobert You should have received a copy of the GNU General Public License 18*404b540aSrobert along with GCC; see the file COPYING. If not, write to 19*404b540aSrobert the Free Software Foundation, 51 Franklin Street, Fifth Floor, 20*404b540aSrobert Boston, MA 02110-1301, USA. */ 21*404b540aSrobert 22*404b540aSrobert /* In this file we set up defaults that can be chosen by 23*404b540aSrobert <target>/lynx.h files. A target-specific lynx.h file can decide 24*404b540aSrobert either to define and override these definitions or to use them by 25*404b540aSrobert ensuring they are undefined at this point. If we were to #undef 26*404b540aSrobert them here we might accidentally disable some target-specific 27*404b540aSrobert defines. */ 28*404b540aSrobert 29*404b540aSrobert #ifndef EXTRA_OS_LYNX_TARGET_SPECS 30*404b540aSrobert # define EXTRA_OS_LYNX_TARGET_SPECS 31*404b540aSrobert #endif 32*404b540aSrobert 33*404b540aSrobert #ifndef EXTRA_OS_LYNX_SPECS 34*404b540aSrobert # define EXTRA_OS_LYNX_SPECS \ 35*404b540aSrobert { "cpp_os_lynx", CPP_OS_LYNX_SPEC }, \ 36*404b540aSrobert { "lib_os_lynx", LIB_OS_LYNX_SPEC }, \ 37*404b540aSrobert { "link_os_lynx", LINK_OS_LYNX_SPEC }, \ 38*404b540aSrobert { "startfile_os_lynx", STARTFILE_OS_LYNX_SPEC }, \ 39*404b540aSrobert { "endfile_os_lynx", ENDFILE_OS_LYNX_SPEC }, \ 40*404b540aSrobert EXTRA_OS_LYNX_TARGET_SPECS 41*404b540aSrobert #endif 42*404b540aSrobert 43*404b540aSrobert #ifndef SUBTARGET_EXTRA_SPECS 44*404b540aSrobert # define SUBTARGET_EXTRA_SPECS EXTRA_OS_LYNX_SPECS 45*404b540aSrobert #endif 46*404b540aSrobert 47*404b540aSrobert #ifndef CPP_SPEC 48*404b540aSrobert # define CPP_SPEC "%(cpp_cpu) %(cpp_os_lynx)" 49*404b540aSrobert #endif 50*404b540aSrobert 51*404b540aSrobert #ifndef LIB_SPEC 52*404b540aSrobert # define LIB_SPEC "%(lib_os_lynx)" 53*404b540aSrobert #endif 54*404b540aSrobert 55*404b540aSrobert #ifndef LINK_SPEC 56*404b540aSrobert # define LINK_SPEC "%(link_os_lynx)" 57*404b540aSrobert #endif 58*404b540aSrobert 59*404b540aSrobert #ifndef STARTFILE_SPEC 60*404b540aSrobert # define STARTFILE_SPEC "%(startfile_os_lynx)" 61*404b540aSrobert #endif 62*404b540aSrobert 63*404b540aSrobert #ifndef ENDFILE_SPEC 64*404b540aSrobert # define ENDFILE_SPEC "%(endfile_os_lynx)" 65*404b540aSrobert #endif 66*404b540aSrobert 67*404b540aSrobert #ifndef CPP_OS_LYNX_SPEC 68*404b540aSrobert # define CPP_OS_LYNX_SPEC \ 69*404b540aSrobert "%{mthreads: \ 70*404b540aSrobert %{mlegacy-threads: \ 71*404b540aSrobert %ecannot use mthreads and mlegacy-threads together}} \ 72*404b540aSrobert %{mthreads: -D_MULTITHREADED} \ 73*404b540aSrobert %{mlegacy-threads: -D_THREADS_POSIX4ad4} \ 74*404b540aSrobert -Asystem=lynx -Asystem=unix -D__Lynx__ -D__unix__" 75*404b540aSrobert #endif 76*404b540aSrobert 77*404b540aSrobert #ifndef LIB_OS_LYNX_SPEC 78*404b540aSrobert # define LIB_OS_LYNX_SPEC \ 79*404b540aSrobert "%{mlegacy-threads:-lposix-pre1c} -lm -lc" 80*404b540aSrobert #endif 81*404b540aSrobert 82*404b540aSrobert /* We link static executables for LynxOS by default unless -mshared is 83*404b540aSrobert used when linking an executable. Along the same line, we link to 84*404b540aSrobert shared libraries when linking a shared object by default unless 85*404b540aSrobert -static is used. 86*404b540aSrobert 87*404b540aSrobert We have to pass in our -L options here otherwise the translated 88*404b540aSrobert startfile directories (%D) will take priority over this. 89*404b540aSrobert Furthermore since we have to pass in -L options here we have to 90*404b540aSrobert make sure that -L options provided by the user take priority over 91*404b540aSrobert everything we specify. */ 92*404b540aSrobert 93*404b540aSrobert #ifndef LINK_OS_LYNX_SPEC 94*404b540aSrobert # define LINK_OS_LYNX_SPEC \ 95*404b540aSrobert "%{shared} %{static} \ 96*404b540aSrobert %{mshared: %{static: %ecannot use mshared and static together}} \ 97*404b540aSrobert %{!mshared: %{!shared: %{!static: -static}}} \ 98*404b540aSrobert %{L*} \ 99*404b540aSrobert %{mthreads: \ 100*404b540aSrobert %{mshared: -L/lib/thread/shlib -rpath /lib/thread/shlib} \ 101*404b540aSrobert %{shared: \ 102*404b540aSrobert %{!static: -L/lib/thread/shlib -rpath /lib/thread/shlib} \ 103*404b540aSrobert %{!mshared: -L/lib/thread}} \ 104*404b540aSrobert %{shared: %{static: -L/lib/thread}}} \ 105*404b540aSrobert %{!mthreads: \ 106*404b540aSrobert %{mshared: -L/lib/shlib -rpath /lib/shlib} \ 107*404b540aSrobert %{shared: -L/lib/shlib -rpath /lib/shlib}} \ 108*404b540aSrobert %{mlegacy-threads:-lposix-pre1c} -lm -lc" 109*404b540aSrobert #endif 110*404b540aSrobert 111*404b540aSrobert #ifndef STARTFILE_OS_LYNX_SPEC 112*404b540aSrobert # define STARTFILE_OS_LYNX_SPEC \ 113*404b540aSrobert "%{!shared: \ 114*404b540aSrobert %{!mthreads: \ 115*404b540aSrobert %{p:gcrt1.o%s} %{pg:gcrt1.o%s} \ 116*404b540aSrobert %{!p:%{!pg:crt1.o%s}}} \ 117*404b540aSrobert %{mthreads: \ 118*404b540aSrobert %{p:thread/gcrt1.o%s} %{pg:thread/gcrt1.o%s} \ 119*404b540aSrobert %{!p:%{!pg:thread/crt1.o%s }}}}\ 120*404b540aSrobert %{mthreads: thread/crti.o%s} %{!mthreads: crti.o%s} \ 121*404b540aSrobert %{!shared: crtbegin.o%s} \ 122*404b540aSrobert %{shared: crtbeginS.o%s}" 123*404b540aSrobert #endif 124*404b540aSrobert 125*404b540aSrobert #ifndef ENDFILE_OS_LYNX_SPEC 126*404b540aSrobert # define ENDFILE_OS_LYNX_SPEC \ 127*404b540aSrobert "%{!shared: crtend.o%s} \ 128*404b540aSrobert %{shared: crtendS.o%s} \ 129*404b540aSrobert %{mthreads: thread/crtn.o%s} %{!mthreads: crtn.o%s}" 130*404b540aSrobert #endif 131*404b540aSrobert 132*404b540aSrobert /* Define the actual types of some ANSI-mandated types. */ 133*404b540aSrobert 134*404b540aSrobert #ifndef SIZE_TYPE 135*404b540aSrobert # define SIZE_TYPE "unsigned int" 136*404b540aSrobert #endif 137*404b540aSrobert 138*404b540aSrobert #ifndef PTRDIFF_TYPE 139*404b540aSrobert # define PTRDIFF_TYPE "int" 140*404b540aSrobert #endif 141*404b540aSrobert 142*404b540aSrobert #ifndef WCHAR_TYPE 143*404b540aSrobert # define WCHAR_TYPE "long int" 144*404b540aSrobert #endif 145*404b540aSrobert 146*404b540aSrobert #ifndef WCHAR_TYPE_SIZE 147*404b540aSrobert # define WCHAR_TYPE_SIZE BITS_PER_WORD 148*404b540aSrobert #endif 149*404b540aSrobert 150*404b540aSrobert /* Define ASM_OUTPUT_ALIGN to use the .balign directive rather that 151*404b540aSrobert the .align directive with GAS. */ 152*404b540aSrobert 153*404b540aSrobert #ifndef ASM_OUTPUT_ALIGN 154*404b540aSrobert # define ASM_OUTPUT_ALIGN(FILE, LOG) \ 155*404b540aSrobert do \ 156*404b540aSrobert { \ 157*404b540aSrobert if ((LOG) != 0) \ 158*404b540aSrobert fprintf ((FILE), "\t.balign %d\n", 1 << (LOG)); \ 159*404b540aSrobert } \ 160*404b540aSrobert while (0) 161*404b540aSrobert #endif 162*404b540aSrobert 163*404b540aSrobert /* Keep the *_DEBUGGING_INFO defines from elfos.h except that stabs is 164*404b540aSrobert the default on LynxOS. */ 165*404b540aSrobert 166*404b540aSrobert #ifndef PREFERRED_DEBUGGING_TYPE 167*404b540aSrobert # define PREFERRED_DEBUGGING_TYPE DBX_DEBUG 168*404b540aSrobert #endif 169*404b540aSrobert 170*404b540aSrobert /* We have C++ support in our system headers. */ 171*404b540aSrobert 172*404b540aSrobert #ifndef NO_IMPLICIT_EXTERN_C 173*404b540aSrobert # define NO_IMPLICIT_EXTERN_C 174*404b540aSrobert #endif 175*404b540aSrobert 176*404b540aSrobert #ifndef TARGET_POSIX_IO 177*404b540aSrobert # define TARGET_POSIX_IO 178*404b540aSrobert #endif 179