1 /* Base configuration file for all DragonFly targets.
2 Copyright (C) 1999, 2000, 2001, 2007, 2008 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)
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 DragonFly configuration.
21 All DragonFly architectures should include this file, which will specify
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>. */
28 #undef TARGET_OS_CPP_BUILTINS
29 #define TARGET_OS_CPP_BUILTINS() \
32 builtin_define_std ("unix"); \
33 builtin_define ("__DragonFly__"); \
34 builtin_assert ("system=unix"); \
35 builtin_assert ("system=bsd"); \
36 builtin_assert ("system=DragonFly"); \
42 "%(cpp_cpu) %(cpp_arch) %{posix:-D_POSIX_SOURCE}"
45 #define STARTFILE_SPEC \
51 %{profile: gcrt1.o%s} \
53 %{pie: Scrt1.o%s;:crt1.o%s}}}}} \
55 %{shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
58 #define ENDFILE_SPEC \
59 "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
63 "%{pthread:-lpthread} -lc"
65 #if defined(HAVE_LD_EH_FRAME_HDR)
66 #define LINK_EH_SPEC "--eh-frame-hdr"
69 /* Provide a LINK_SPEC appropriate for DragonFly. Here we provide support
70 for the special GCC options -static and -shared, which allow us to
71 link things in one of these three modes by applying the appropriate
72 combinations of options at link-time.
74 When the -shared link option is used a final link is not being
77 #define DFBSD_LINK_SPEC \
78 "%{p:%nconsider using '-pg' instead of '-p' with gprof(1)} \
80 %{assert*} %{R*} %{rpath*} %{defsym*} \
81 %{shared:-Bshareable %{h*} %{soname*}} \
84 %{rdynamic:-export-dynamic} \
85 -dynamic-linker %(dfbsd_dynamic_linker) \
89 %{!static:--hash-style=both} \
90 %{symbolic:-Bsymbolic}"
93 #define LINK_SPEC DFBSD_LINK_SPEC
95 #define DFBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.2"
98 /* Use --as-needed -lgcc_s for eh support. */
99 #ifdef HAVE_LD_AS_NEEDED
100 #define USE_LD_AS_NEEDED 1
103 /************************[ Target stuff ]***********************************/
105 /* All DragonFly Architectures support the ELF object file format. */
106 #undef OBJECT_FORMAT_ELF
107 #define OBJECT_FORMAT_ELF
109 /* Don't assume anything about the header files. */
110 #undef NO_IMPLICIT_EXTERN_C
111 #define NO_IMPLICIT_EXTERN_C 1
113 /* Follow DragonFly's standard headers (<machine/stdint.h>, etc...). */
116 #define WCHAR_TYPE "int"
119 #define WINT_TYPE "int"
122 * Profile libraries are found at /usr/lib/profile with standard names
123 * #define MATH_LIBRARY_PROFILE "m_p"
126 /* Code generation parameters. */
128 /* Use periods rather than dollar signs in special g++ assembler names.
129 This ensures the configuration knows our system correctly so we can link
130 with libraries compiled with the native cc. */
131 #undef NO_DOLLAR_IN_LABEL
133 /* Used by libgcc2.c. We support file locking with fcntl / F_SETLKW.
134 This enables the test coverage code to use file locking when exiting a
135 program, which avoids race conditions if the program has forked. */
136 #define TARGET_POSIX_IO