2008-11-19 Andrew Stubbs <ams@codesourcery.com>
[official-gcc.git] / gcc / config / freebsd.h
blob81e0ac131eb26e43bd82847194915b7e71ecee56
1 /* Base configuration file for all FreeBSD targets.
2 Copyright (C) 1999, 2000, 2001, 2007 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC 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 3, or (at your option)
9 any later version.
11 GCC 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 GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
20 /* Common FreeBSD configuration.
21 All FreeBSD architectures should include this file, which will specify
22 their commonalities.
23 Adapted from gcc/config/i386/freebsd-elf.h by
24 David O'Brien <obrien@FreeBSD.org>.
25 Further work by David O'Brien <obrien@FreeBSD.org> and
26 Loren J. Rittle <ljrittle@acm.org>. */
29 /* In case we need to know. */
30 #define USING_CONFIG_FREEBSD 1
32 /* This defines which switch letters take arguments. On FreeBSD, most of
33 the normal cases (defined in gcc.c) apply, and we also have -h* and
34 -z* options (for the linker) (coming from SVR4).
35 We also have -R (alias --rpath), no -z, --soname (-h), --assert etc. */
37 #undef SWITCH_TAKES_ARG
38 #define SWITCH_TAKES_ARG(CHAR) (FBSD_SWITCH_TAKES_ARG(CHAR))
40 #undef WORD_SWITCH_TAKES_ARG
41 #define WORD_SWITCH_TAKES_ARG(STR) (FBSD_WORD_SWITCH_TAKES_ARG(STR))
43 #undef TARGET_OS_CPP_BUILTINS
44 #define TARGET_OS_CPP_BUILTINS() FBSD_TARGET_OS_CPP_BUILTINS()
46 #undef CPP_SPEC
47 #define CPP_SPEC FBSD_CPP_SPEC
49 #undef STARTFILE_SPEC
50 #define STARTFILE_SPEC FBSD_STARTFILE_SPEC
52 #undef ENDFILE_SPEC
53 #define ENDFILE_SPEC FBSD_ENDFILE_SPEC
55 #undef LIB_SPEC
56 #define LIB_SPEC FBSD_LIB_SPEC
58 /* Define this so we can compile MS code for use with WINE. */
59 #define HANDLE_PRAGMA_PACK_PUSH_POP 1
61 /************************[ Target stuff ]***********************************/
63 /* All FreeBSD Architectures support the ELF object file format. */
64 #undef OBJECT_FORMAT_ELF
65 #define OBJECT_FORMAT_ELF
67 /* Don't assume anything about the header files. */
68 #undef NO_IMPLICIT_EXTERN_C
69 #define NO_IMPLICIT_EXTERN_C 1
71 /* Make gcc agree with FreeBSD's standard headers (<machine/ansi.h>, etc...) */
73 #undef WCHAR_TYPE
74 #define WCHAR_TYPE "int"
76 #define MATH_LIBRARY_PROFILE "-lm_p"
78 /* Code generation parameters. */
80 /* Use periods rather than dollar signs in special g++ assembler names.
81 This ensures the configuration knows our system correctly so we can link
82 with libraries compiled with the native cc. */
83 #undef NO_DOLLAR_IN_LABEL
85 /* Used by libgcc2.c. We support file locking with fcntl / F_SETLKW.
86 This enables the test coverage code to use file locking when exiting a
87 program, which avoids race conditions if the program has forked. */
88 #define TARGET_POSIX_IO