]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/rs6000/netbsd.h
Update Copyright years for files modified in 2010.
[thirdparty/gcc.git] / gcc / config / rs6000 / netbsd.h
CommitLineData
edf1b3f3
AC
1/* Definitions of target machine for GNU compiler,
2 for PowerPC NetBSD systems.
a1cd969e 3 Copyright 2002, 2003, 2007, 2008, 2010 Free Software Foundation, Inc.
a4967b8d 4 Contributed by Wasabi Systems, Inc.
edf1b3f3 5
5de601cf 6 This file is part of GCC.
edf1b3f3 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.
edf1b3f3 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.
edf1b3f3 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/>. */
edf1b3f3 21
5de601cf 22#undef TARGET_OS_CPP_BUILTINS /* FIXME: sysv4.h should not define this! */
a4967b8d
JT
23#define TARGET_OS_CPP_BUILTINS() \
24 do \
25 { \
26 NETBSD_OS_CPP_BUILTINS_ELF(); \
27 builtin_define ("__powerpc__"); \
28 builtin_assert ("cpu=powerpc"); \
29 builtin_assert ("machine=powerpc"); \
30 } \
31 while (0)
edf1b3f3 32
647d340d
JT
33/* Override the default from rs6000.h to avoid conflicts with macros
34 defined in NetBSD header files. */
35
5de601cf 36#undef RS6000_CPU_CPP_ENDIAN_BUILTINS
647d340d
JT
37#define RS6000_CPU_CPP_ENDIAN_BUILTINS() \
38 do \
39 { \
40 if (BYTES_BIG_ENDIAN) \
41 { \
42 builtin_define ("__BIG_ENDIAN__"); \
43 builtin_assert ("machine=bigendian"); \
44 } \
45 else \
46 { \
47 builtin_define ("__LITTLE_ENDIAN__"); \
48 builtin_assert ("machine=littleendian"); \
49 } \
50 } \
51 while (0)
52
a4967b8d 53/* Make GCC agree with <machine/ansi.h>. */
edf1b3f3 54
5de601cf 55#undef SIZE_TYPE
a4967b8d 56#define SIZE_TYPE "unsigned int"
edf1b3f3 57
5de601cf 58#undef PTRDIFF_TYPE
a4967b8d 59#define PTRDIFF_TYPE "int"
edf1b3f3 60
a4967b8d
JT
61/* Undo the spec mess from sysv4.h, and just define the specs
62 the way NetBSD systems actually expect. */
edf1b3f3 63
5de601cf 64#undef CPP_SPEC
a4967b8d 65#define CPP_SPEC NETBSD_CPP_SPEC
edf1b3f3 66
5de601cf 67#undef LINK_SPEC
a4967b8d
JT
68#define LINK_SPEC \
69 "%{!msdata=none:%{G*}} %{msdata=none:-G0} \
70 %(netbsd_link_spec)"
edf1b3f3 71
a4967b8d 72#define NETBSD_ENTRY_POINT "_start"
edf1b3f3 73
5de601cf 74#undef STARTFILE_SPEC
a4967b8d 75#define STARTFILE_SPEC NETBSD_STARTFILE_SPEC
edf1b3f3 76
5de601cf 77#undef ENDFILE_SPEC
18724e30 78#define ENDFILE_SPEC "%(netbsd_endfile_spec)"
edf1b3f3 79
5de601cf 80#undef LIB_SPEC
a4967b8d
JT
81#define LIB_SPEC NETBSD_LIB_SPEC
82
5de601cf 83#undef SUBTARGET_EXTRA_SPECS
a4967b8d
JT
84#define SUBTARGET_EXTRA_SPECS \
85 { "netbsd_link_spec", NETBSD_LINK_SPEC_ELF }, \
86 { "netbsd_entry_point", NETBSD_ENTRY_POINT }, \
87 { "netbsd_endfile_spec", NETBSD_ENDFILE_SPEC },
6fa3f289 88
a4967b8d 89
5de601cf 90#undef TARGET_VERSION
a4967b8d 91#define TARGET_VERSION fprintf (stderr, " (NetBSD/powerpc ELF)");
a1cd969e
JM
92
93#define DBX_REGISTER_NUMBER(REGNO) rs6000_dbx_register_number (REGNO)