xref: /openbsd/gnu/usr.bin/gcc/gcc/config/alpha/freebsd.h (revision 4bdff4be)
1 /* Definitions for DEC Alpha/AXP running FreeBSD using the ELF format
2    Copyright (C) 2000, 2002 Free Software Foundation, Inc.
3    Contributed by David E. O'Brien <obrien@FreeBSD.org> and BSDi.
4 
5 This file is part of GNU CC.
6 
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11 
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING.  If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.  */
21 
22 
23 /* Provide a FBSD_TARGET_CPU_CPP_BUILTINS and CPP_SPEC appropriate for
24    FreeBSD/alpha.  Besides the dealing with
25    the GCC option `-posix', and PIC issues as on all FreeBSD platforms, we must
26    deal with the Alpha's FP issues.  */
27 
28 #undef FBSD_TARGET_CPU_CPP_BUILTINS
29 #define FBSD_TARGET_CPU_CPP_BUILTINS()		\
30   do						\
31     {						\
32       builtin_define ("__LP64__");		\
33       if (flag_pic)				\
34 	{					\
35 	  builtin_define ("__PIC__");		\
36 	  builtin_define ("__pic__");		\
37 	}					\
38     }						\
39   while (0)
40 
41 #undef  CPP_SPEC
42 #define CPP_SPEC "%(cpp_subtarget) %{posix:-D_POSIX_SOURCE}"
43 
44 #define LINK_SPEC "%{G*} %{relax:-relax}				\
45   %{p:%e`-p' not supported; use `-pg' and gprof(1)}			\
46   %{Wl,*:%*}								\
47   %{assert*} %{R*} %{rpath*} %{defsym*}					\
48   %{shared:-Bshareable %{h*} %{soname*}}				\
49   %{symbolic:-Bsymbolic}						\
50   %{!shared:								\
51     %{!static:								\
52       %{rdynamic:-export-dynamic}					\
53       %{!dynamic-linker:-dynamic-linker /usr/libexec/ld-elf.so.1}}	\
54     %{static:-Bstatic}}"
55 
56 
57 /************************[  Target stuff  ]***********************************/
58 
59 /* Define the actual types of some ANSI-mandated types.
60    Needs to agree with <machine/ansi.h>.  GCC defaults come from c-decl.c,
61    c-common.c, and config/<arch>/<arch>.h.  */
62 
63 /* alpha.h gets this wrong for FreeBSD.  We use the GCC defaults instead.  */
64 #undef WCHAR_TYPE
65 
66 #undef  WCHAR_TYPE_SIZE
67 #define WCHAR_TYPE_SIZE	32
68 
69 #undef  TARGET_VERSION
70 #define TARGET_VERSION fprintf (stderr, " (FreeBSD/alpha ELF)");
71 
72 #define TARGET_ELF	1
73 
74 #undef  TARGET_DEFAULT
75 #define TARGET_DEFAULT	(MASK_FP | MASK_FPREGS | MASK_GAS)
76 
77 #undef HAS_INIT_SECTION
78 
79 /* Show that we need a GP when profiling.  */
80 #undef  TARGET_PROFILING_NEEDS_GP
81 #define TARGET_PROFILING_NEEDS_GP 1
82 
83 /* This is the char to use for continuation (in case we need to turn
84    continuation back on).  */
85 
86 #undef  DBX_CONTIN_CHAR
87 #define DBX_CONTIN_CHAR	'?'
88 
89 /* Don't default to pcc-struct-return, we want to retain compatibility with
90    older FreeBSD releases AND pcc-struct-return may not be reentrant.  */
91 
92 #undef  DEFAULT_PCC_STRUCT_RETURN
93 #define DEFAULT_PCC_STRUCT_RETURN 0
94