]>
Commit | Line | Data |
---|---|---|
4d47fe5a | 1 | /* Definitions for RISC-V FreeBSD systems with ELF format. |
8d9254fc | 2 | Copyright (C) 2018-2020 Free Software Foundation, Inc. |
4d47fe5a RB |
3 | |
4 | This file is part of GCC. | |
5 | ||
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. | |
10 | ||
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. | |
15 | ||
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/>. */ | |
19 | ||
20 | #undef WCHAR_TYPE | |
21 | #define WCHAR_TYPE "int" | |
22 | ||
23 | #undef WCHAR_TYPE_SIZE | |
24 | #define WCHAR_TYPE_SIZE 32 | |
25 | ||
26 | #undef SUBTARGET_EXTRA_SPECS | |
27 | #define SUBTARGET_EXTRA_SPECS \ | |
28 | { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER } | |
29 | ||
30 | #undef CC1_SPEC | |
31 | #define CC1_SPEC "%(cc1_cpu) %{profile:-p}" | |
32 | ||
33 | /* Provide a LINK_SPEC appropriate for FreeBSD. Here we provide support | |
34 | for the special GCC options -static and -shared, which allow us to | |
35 | link things in one of these three modes by applying the appropriate | |
36 | combinations of options at link-time. | |
37 | ||
38 | When the -shared link option is used a final link is not being | |
39 | done. */ | |
40 | ||
41 | #undef LINK_SPEC | |
42 | #define LINK_SPEC " \ | |
43 | -melf" XLEN_SPEC "lriscv \ | |
765f8786 | 44 | %{p:%nconsider using `-pg' instead of `-p' with gprof (1)} \ |
4d47fe5a RB |
45 | %{v:-V} \ |
46 | %{assert*} %{R*} %{rpath*} %{defsym*} \ | |
47 | %{shared:-Bshareable %{h*} %{soname*}} \ | |
48 | %{symbolic:-Bsymbolic} \ | |
49 | %{static:-Bstatic} \ | |
50 | %{!shared: \ | |
51 | %{!static: \ | |
52 | %{rdynamic:-export-dynamic} \ | |
53 | -dynamic-linker " FBSD_DYNAMIC_LINKER "} \ | |
54 | %{static:-static}}" | |
5e664ed0 JW |
55 | |
56 | #define STARTFILE_PREFIX_SPEC \ | |
57 | "/lib" XLEN_SPEC "/" ABI_SPEC "/ " \ | |
58 | "/usr/lib" XLEN_SPEC "/" ABI_SPEC "/ " \ | |
59 | "/lib/ " \ | |
60 | "/usr/lib/ " |