1*404b540aSrobert /* Definitions of target machine for GNU compiler, 2*404b540aSrobert for PowerPC NetBSD systems. 3*404b540aSrobert Copyright 2002, 2003 Free Software Foundation, Inc. 4*404b540aSrobert Contributed by Wasabi Systems, Inc. 5*404b540aSrobert 6*404b540aSrobert This file is part of GCC. 7*404b540aSrobert 8*404b540aSrobert GCC is free software; you can redistribute it and/or modify it 9*404b540aSrobert under the terms of the GNU General Public License as published 10*404b540aSrobert by the Free Software Foundation; either version 2, or (at your 11*404b540aSrobert option) any later version. 12*404b540aSrobert 13*404b540aSrobert GCC is distributed in the hope that it will be useful, but WITHOUT 14*404b540aSrobert ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 15*404b540aSrobert or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 16*404b540aSrobert License for more details. 17*404b540aSrobert 18*404b540aSrobert You should have received a copy of the GNU General Public License 19*404b540aSrobert along with GCC; see the file COPYING. If not, write to the 20*404b540aSrobert Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, 21*404b540aSrobert MA 02110-1301, USA. */ 22*404b540aSrobert 23*404b540aSrobert #undef TARGET_OS_CPP_BUILTINS /* FIXME: sysv4.h should not define this! */ 24*404b540aSrobert #define TARGET_OS_CPP_BUILTINS() \ 25*404b540aSrobert do \ 26*404b540aSrobert { \ 27*404b540aSrobert NETBSD_OS_CPP_BUILTINS_ELF(); \ 28*404b540aSrobert builtin_define ("__powerpc__"); \ 29*404b540aSrobert builtin_assert ("cpu=powerpc"); \ 30*404b540aSrobert builtin_assert ("machine=powerpc"); \ 31*404b540aSrobert } \ 32*404b540aSrobert while (0) 33*404b540aSrobert 34*404b540aSrobert /* Override the default from rs6000.h to avoid conflicts with macros 35*404b540aSrobert defined in NetBSD header files. */ 36*404b540aSrobert 37*404b540aSrobert #undef RS6000_CPU_CPP_ENDIAN_BUILTINS 38*404b540aSrobert #define RS6000_CPU_CPP_ENDIAN_BUILTINS() \ 39*404b540aSrobert do \ 40*404b540aSrobert { \ 41*404b540aSrobert if (BYTES_BIG_ENDIAN) \ 42*404b540aSrobert { \ 43*404b540aSrobert builtin_define ("__BIG_ENDIAN__"); \ 44*404b540aSrobert builtin_assert ("machine=bigendian"); \ 45*404b540aSrobert } \ 46*404b540aSrobert else \ 47*404b540aSrobert { \ 48*404b540aSrobert builtin_define ("__LITTLE_ENDIAN__"); \ 49*404b540aSrobert builtin_assert ("machine=littleendian"); \ 50*404b540aSrobert } \ 51*404b540aSrobert } \ 52*404b540aSrobert while (0) 53*404b540aSrobert 54*404b540aSrobert /* Make GCC agree with <machine/ansi.h>. */ 55*404b540aSrobert 56*404b540aSrobert #undef SIZE_TYPE 57*404b540aSrobert #define SIZE_TYPE "unsigned int" 58*404b540aSrobert 59*404b540aSrobert #undef PTRDIFF_TYPE 60*404b540aSrobert #define PTRDIFF_TYPE "int" 61*404b540aSrobert 62*404b540aSrobert /* Undo the spec mess from sysv4.h, and just define the specs 63*404b540aSrobert the way NetBSD systems actually expect. */ 64*404b540aSrobert 65*404b540aSrobert #undef CPP_SPEC 66*404b540aSrobert #define CPP_SPEC NETBSD_CPP_SPEC 67*404b540aSrobert 68*404b540aSrobert #undef LINK_SPEC 69*404b540aSrobert #define LINK_SPEC \ 70*404b540aSrobert "%{!msdata=none:%{G*}} %{msdata=none:-G0} \ 71*404b540aSrobert %(netbsd_link_spec)" 72*404b540aSrobert 73*404b540aSrobert #define NETBSD_ENTRY_POINT "_start" 74*404b540aSrobert 75*404b540aSrobert #undef STARTFILE_SPEC 76*404b540aSrobert #define STARTFILE_SPEC NETBSD_STARTFILE_SPEC 77*404b540aSrobert 78*404b540aSrobert #undef ENDFILE_SPEC 79*404b540aSrobert #define ENDFILE_SPEC \ 80*404b540aSrobert "crtsavres%O%s %(netbsd_endfile_spec)" 81*404b540aSrobert 82*404b540aSrobert #undef LIB_SPEC 83*404b540aSrobert #define LIB_SPEC NETBSD_LIB_SPEC 84*404b540aSrobert 85*404b540aSrobert #undef SUBTARGET_EXTRA_SPECS 86*404b540aSrobert #define SUBTARGET_EXTRA_SPECS \ 87*404b540aSrobert { "netbsd_link_spec", NETBSD_LINK_SPEC_ELF }, \ 88*404b540aSrobert { "netbsd_entry_point", NETBSD_ENTRY_POINT }, \ 89*404b540aSrobert { "netbsd_endfile_spec", NETBSD_ENDFILE_SPEC }, 90*404b540aSrobert 91*404b540aSrobert 92*404b540aSrobert #undef TARGET_VERSION 93*404b540aSrobert #define TARGET_VERSION fprintf (stderr, " (NetBSD/powerpc ELF)"); 94