]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/dragonfly.h
Update copyright years.
[thirdparty/gcc.git] / gcc / config / dragonfly.h
CommitLineData
dbed5a9b 1/* Base configuration file for all DragonFly targets.
8d9254fc 2 Copyright (C) 2014-2020 Free Software Foundation, Inc.
dbed5a9b
JM
3 Contributed by John Marino <gnugcc@marino.st>
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 3, or (at your option)
10any later version.
11
12GCC is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17Under Section 7 of GPL version 3, you are granted additional
18permissions described in the GCC Runtime Library Exception, version
193.1, as published by the Free Software Foundation.
20
21You should have received a copy of the GNU General Public License and
22a copy of the GCC Runtime Library Exception along with this program;
23see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24<http://www.gnu.org/licenses/>. */
25
26#undef TARGET_OS_CPP_BUILTINS
27#define TARGET_OS_CPP_BUILTINS() \
28 do \
29 { \
30 builtin_define_std ("unix"); \
31 builtin_define ("__DragonFly__"); \
32 builtin_assert ("system=unix"); \
33 builtin_assert ("system=bsd"); \
34 builtin_assert ("system=DragonFly"); \
35 } \
36 while (0)
37
38#undef CPP_SPEC
39#define CPP_SPEC \
40 "%(cpp_cpu) %(cpp_arch) %{posix:-D_POSIX_SOURCE}"
41
42#undef STARTFILE_SPEC
43#define STARTFILE_SPEC \
44 "%{!shared: \
45 %{pg:gcrt1.o%s} \
46 %{!pg: \
47 %{p:gcrt1.o%s} \
48 %{!p: \
49 %{profile: gcrt1.o%s} \
50 %{!profile: \
51 %{pie: Scrt1.o%s;:crt1.o%s}}}}} \
52 crti.o%s \
53 %{shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
54
55#undef ENDFILE_SPEC
56#define ENDFILE_SPEC \
57 "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
58
59#undef LIB_SPEC
60#define LIB_SPEC \
61 "%{pthread:-lpthread} -lc"
62
63#if defined(HAVE_LD_EH_FRAME_HDR)
64#define LINK_EH_SPEC "--eh-frame-hdr"
65#endif
66
67/* Provide a LINK_SPEC appropriate for DragonFly. Here we provide support
68 for the special GCC options -static and -shared, which allow us to
69 link things in one of these three modes by applying the appropriate
70 combinations of options at link-time.
71
72 When the -shared link option is used a final link is not being
73 done. */
74
75#define DFBSD_LINK_SPEC \
76 "%{p:%nconsider using '-pg' instead of '-p' with gprof(1)} \
77 %{v:-V} \
78 %{assert*} %{R*} %{rpath*} %{defsym*} \
79 %{shared:-Bshareable %{h*} %{soname*}} \
80 %{!shared: \
81 %{!static: \
82 %{rdynamic:-export-dynamic} \
83 -dynamic-linker %(dfbsd_dynamic_linker) \
84 } \
85 %{static:-Bstatic} \
86 } \
87 %{!static:--hash-style=gnu} \
88 %{symbolic:-Bsymbolic}"
89
90#undef LINK_SPEC
91#define LINK_SPEC DFBSD_LINK_SPEC
92
93#define DFBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.2"
94
95
96/* Use --as-needed -lgcc_s for eh support. */
97#ifdef HAVE_LD_AS_NEEDED
98#define USE_LD_AS_NEEDED 1
99#endif
100
101/************************[ Target stuff ]***********************************/
102
103/* All DragonFly Architectures support the ELF object file format. */
104#undef OBJECT_FORMAT_ELF
105#define OBJECT_FORMAT_ELF
106
dbed5a9b
JM
107/* Follow DragonFly's standard headers (<machine/stdint.h>, etc...). */
108
109#undef WCHAR_TYPE
110#define WCHAR_TYPE "int"
111
112#undef WINT_TYPE
113#define WINT_TYPE "int"
114
115/* Code generation parameters. */
116
117/* Use periods rather than dollar signs in special g++ assembler names.
118 This ensures the configuration knows our system correctly so we can link
119 with libraries compiled with the native cc. */
120#undef NO_DOLLAR_IN_LABEL
121
122/* Used by libgcc2.c. We support file locking with fcntl / F_SETLKW.
123 This enables the test coverage code to use file locking when exiting a
124 program, which avoids race conditions if the program has forked. */
125#define TARGET_POSIX_IO