]> gcc.gnu.org Git - gcc.git/blame - gcc/config/freebsd.h
mips.h (REGISTER_MOVE_COST): Remove redundant case for moving from HI/LO/HI_LO_REG.
[gcc.git] / gcc / config / freebsd.h
CommitLineData
4e32293c
JL
1/* Base configuration file for all FreeBSD targets.
2 Copyright (C) 1999 Free Software Foundation, Inc.
3
4This file is part of GNU CC.
5
6GNU CC is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11GNU CC is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU CC; see the file COPYING. If not, write to
18the Free Software Foundation, 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */
20
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>. */
26
27
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. */
32
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')
38
39#undef SWITCH_TAKES_ARG
40#define SWITCH_TAKES_ARG(CHAR) (FBSD_SWITCH_TAKES_ARG(CHAR))
41
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"))
47
48#undef WORD_SWITCH_TAKES_ARG
49#define WORD_SWITCH_TAKES_ARG(STR) (FBSD_WORD_SWITCH_TAKES_ARG(STR))
50
51/* Provide a CPP_SPEC appropriate for FreeBSD. We just deal with the GCC
52 option `-posix', and PIC issues. */
53
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}"
58
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). */
62
63#undef LIB_SPEC
64#define LIB_SPEC \
65 "%{!shared: \
66 %{!pg:%{!pthread:%{!kthread:-lc} \
67 %{kthread:-lpthread -lc}} \
68 %{pthread:-lc_r}} \
69 %{pg:%{!pthread:%{!kthread:-lc_p} \
70 %{kthread:-lpthread_p -lc_p}} \
71 %{pthread:-lc_r_p}}}"
72
73
74/* Code generation parameters. */
75
76/* Make gcc agree with <machine/ansi.h>. */
77
78#undef WCHAR_TYPE
79#define WCHAR_TYPE "int"
80
81#undef WCHAR_UNSIGNED
82#define WCHAR_UNSIGNED 0
83
84/* Don't default to pcc-struct-return, because gcc is the only compiler, and
85 we want to retain compatibility with older gcc versions
86 (even though the SVR4 ABI for the i386 says that records and unions are
87 returned in memory). */
88#undef DEFAULT_PCC_STRUCT_RETURN
89#define DEFAULT_PCC_STRUCT_RETURN 0
90
91/* Ensure we the configuration knows our system correctly so we can link with
92 libraries compiled with the native cc. */
93#undef NO_DOLLAR_IN_LABEL
94
95/* Use more efficient ``thunks'' to implement C++ vtables. */
96#undef DEFAULT_VTABLE_THUNKS
97#define DEFAULT_VTABLE_THUNKS 1
98
99/* This is BSD, so use stabs instead of DWARF debug format. */
100#undef PREFERRED_DEBUGGING_TYPE
101#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
102
103/* Attach a special .ident directive to the end of the file to identify
104 the version of GCC which compiled this code. The format of the .ident
105 string is patterned after the ones produced by native SVR4 C compilers. */
106#undef IDENT_ASM_OP
107#define IDENT_ASM_OP ".ident"
108
109/* Output #ident as a .ident. */
110#undef ASM_OUTPUT_IDENT
111#define ASM_OUTPUT_IDENT(FILE, NAME) \
112 fprintf ((FILE), "\t%s\t\"%s\"\n", IDENT_ASM_OP, (NAME));
113
114#undef ASM_IDENTIFY_LANGUAGE
115#define ASM_IDENTIFY_LANGUAGE(FILE) \
116 fprintf ((FILE), "\t%s \"GCC (%s) %s\"\n", IDENT_ASM_OP, \
117 lang_identify (), version_string)
118
119#undef ASM_FILE_END
120#define ASM_FILE_END(FILE) \
121do { \
122 if (!flag_no_ident) \
123 fprintf ((FILE), "\t%s\t\"GCC: (GNU) %s\"\n", \
124 IDENT_ASM_OP, version_string); \
125 } while (0)
126
127
128/* Miscellaneous parameters. */
129
130/* Don't assume anything about the header files. */
131#undef NO_IMPLICIT_EXTERN_C
132#define NO_IMPLICIT_EXTERN_C
133
134/* Allow #sccs in preprocessor. */
135#define SCCS_DIRECTIVE
136
137/* Handle #pragma weak and #pragma pack. */
138#define HANDLE_SYSV_PRAGMA
139
140/* Tell libgcc2.c that FreeBSD targets support atexit(3). */
141#define HAVE_ATEXIT
This page took 0.067575 seconds and 5 git commands to generate.