PR target/49868
[official-gcc.git] / gcc / config / freebsd.h
blobf9a47132c3a1d7b9bb9290a2aca090507e493b7c
1 /* Base configuration file for all FreeBSD targets.
2 Copyright (C) 1999, 2000, 2001, 2007, 2008, 2009,
3 2010, 2011, 2012 Free Software Foundation, Inc.
5 This file is part of GCC.
7 GCC 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 3, or (at your option)
10 any later version.
12 GCC 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.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
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 Further work by David O'Brien <obrien@FreeBSD.org> and
27 Loren J. Rittle <ljrittle@acm.org>. */
30 /* In case we need to know. */
31 #define USING_CONFIG_FREEBSD 1
33 #undef TARGET_OS_CPP_BUILTINS
34 #define TARGET_OS_CPP_BUILTINS() FBSD_TARGET_OS_CPP_BUILTINS()
36 #undef CPP_SPEC
37 #define CPP_SPEC FBSD_CPP_SPEC
39 #undef STARTFILE_SPEC
40 #define STARTFILE_SPEC FBSD_STARTFILE_SPEC
42 #undef ENDFILE_SPEC
43 #define ENDFILE_SPEC FBSD_ENDFILE_SPEC
45 #undef LIB_SPEC
46 #define LIB_SPEC FBSD_LIB_SPEC
48 #if defined(HAVE_LD_EH_FRAME_HDR)
49 #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
50 #endif
52 #ifdef TARGET_LIBC_PROVIDES_SSP
53 #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all:-lssp_nonshared}"
54 #endif
56 /* Use --as-needed -lgcc_s for eh support. */
57 #ifdef HAVE_LD_AS_NEEDED
58 #define USE_LD_AS_NEEDED 1
59 #endif
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 /* Follow FreeBSD's standard headers (<sys/_types.h> etc...). */
73 #undef WCHAR_TYPE
74 #define WCHAR_TYPE "int"
76 #undef WINT_TYPE
77 #define WINT_TYPE "int"
79 #define MATH_LIBRARY_PROFILE "m_p"
81 /* Code generation parameters. */
83 /* Use periods rather than dollar signs in special g++ assembler names.
84 This ensures the configuration knows our system correctly so we can link
85 with libraries compiled with the native cc. */
86 #undef NO_DOLLAR_IN_LABEL
88 /* Used by libgcc2.c. We support file locking with fcntl / F_SETLKW.
89 This enables the test coverage code to use file locking when exiting a
90 program, which avoids race conditions if the program has forked. */
91 #define TARGET_POSIX_IO