Makefile.in (endfile.o): Add dependency on config.h.
[official-gcc.git] / gcc / config / freebsd.h
blob18065c01cd8e3b70906a0a6374eb84a85cd78acf
1 /* Base configuration file for all FreeBSD targets.
2 Copyright (C) 1999, 2000 Free Software Foundation, Inc.
4 This file is part of GNU CC.
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING. If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 /* Common FreeBSD configuration.
22 All FreeBSD architectures should include this file, which will specify
23 their commonalities.
24 Adapted from gcc/config/i386/freebsd-elf.h by
25 David O'Brien <obrien@FreeBSD.org>. */
28 /* This defines which switch letters take arguments. On FreeBSD, most of
29 the normal cases (defined in gcc.c) apply, and we also have -h* and
30 -z* options (for the linker) (coming from SVR4).
31 We also have -R (alias --rpath), no -z, --soname (-h), --assert etc. */
33 #define FBSD_SWITCH_TAKES_ARG(CHAR) \
34 (DEFAULT_SWITCH_TAKES_ARG (CHAR) \
35 || (CHAR) == 'h' \
36 || (CHAR) == 'z' /* ignored by ld */ \
37 || (CHAR) == 'R')
39 #undef SWITCH_TAKES_ARG
40 #define SWITCH_TAKES_ARG(CHAR) (FBSD_SWITCH_TAKES_ARG(CHAR))
42 #define FBSD_WORD_SWITCH_TAKES_ARG(STR) \
43 (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \
44 || !strcmp ((STR), "rpath") || !strcmp ((STR), "rpath-link") \
45 || !strcmp ((STR), "soname") || !strcmp ((STR), "defsym") \
46 || !strcmp ((STR), "assert") || !strcmp ((STR), "dynamic-linker"))
48 #undef WORD_SWITCH_TAKES_ARG
49 #define WORD_SWITCH_TAKES_ARG(STR) (FBSD_WORD_SWITCH_TAKES_ARG(STR))
51 /* Provide a CPP_SPEC appropriate for FreeBSD. We just deal with the GCC
52 option `-posix', and PIC issues. */
54 #undef CPP_SPEC
55 #define CPP_SPEC "%(cpp_cpu) \
56 %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} \
57 %{posix:-D_POSIX_SOURCE}"
59 /* Provide a LIB_SPEC appropriate for FreeBSD. Just select the appropriate
60 libc, depending on whether we're doing profiling or need threads support.
61 (simular to the default, except no -lg, and no -p). */
63 #undef LIB_SPEC
64 #define LIB_SPEC " \
65 %{!shared: \
66 %{!pg: \
67 %{!pthread:-lc} \
68 %{pthread:-lc_r}} \
69 %{pg: \
70 %{!pthread:-lc_p} \
71 %{pthread:-lc_r_p}} \
75 /* Code generation parameters. */
77 /* Make gcc agree with <machine/ansi.h>. */
79 #undef WCHAR_TYPE
80 #define WCHAR_TYPE "int"
82 #undef WCHAR_UNSIGNED
83 #define WCHAR_UNSIGNED 0
85 /* Don't default to pcc-struct-return, because gcc is the only compiler, and
86 we want to retain compatibility with older gcc versions
87 (even though the SVR4 ABI for the i386 says that records and unions are
88 returned in memory). */
89 #undef DEFAULT_PCC_STRUCT_RETURN
90 #define DEFAULT_PCC_STRUCT_RETURN 0
92 /* Ensure we the configuration knows our system correctly so we can link with
93 libraries compiled with the native cc. */
94 #undef NO_DOLLAR_IN_LABEL
96 /* Use more efficient ``thunks'' to implement C++ vtables. */
97 #undef DEFAULT_VTABLE_THUNKS
98 #define DEFAULT_VTABLE_THUNKS 1
100 /* This is BSD, so use stabs instead of DWARF debug format. */
101 #undef PREFERRED_DEBUGGING_TYPE
102 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
104 #undef IDENT_ASM_OP
105 #define IDENT_ASM_OP "\t.ident\t"
107 /* Output #ident as a .ident. */
108 #undef ASM_OUTPUT_IDENT
109 #define ASM_OUTPUT_IDENT(FILE, NAME) \
110 fprintf ((FILE), "%s\"%s\"\n", IDENT_ASM_OP, (NAME));
112 /* Miscellaneous parameters. */
114 /* Don't assume anything about the header files. */
115 #undef NO_IMPLICIT_EXTERN_C
116 #define NO_IMPLICIT_EXTERN_C
118 /* Allow #sccs in preprocessor. */
119 #define SCCS_DIRECTIVE
121 /* Handle #pragma weak and #pragma pack. */
122 #define HANDLE_SYSV_PRAGMA