1 /* Definitions for RISC-V FreeBSD systems with ELF format.
2 Copyright (C) 2018-2025 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/>. */
21 #define WCHAR_TYPE "int"
23 #undef WCHAR_TYPE_SIZE
24 #define WCHAR_TYPE_SIZE 32
26 #undef SUBTARGET_EXTRA_SPECS
27 #define SUBTARGET_EXTRA_SPECS \
28 { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER }
31 #define CC1_SPEC "%(cc1_cpu) %{profile:-p}"
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.
38 When the -shared link option is used a final link is not being
43 -melf" XLEN_SPEC DEFAULT_ENDIAN_SPEC "riscv \
44 %{p:%nconsider using `-pg' instead of `-p' with gprof (1)} \
45 " FBSD_LINK_PG_NOTES " \
47 %{assert*} %{R*} %{rpath*} %{defsym*} \
50 %{mlittle-endian:-EL} \
51 %{shared:-Bshareable %{h*} %{soname*}} \
52 %{symbolic:-Bsymbolic} \
56 %{rdynamic:-export-dynamic} \
57 -dynamic-linker " FBSD_DYNAMIC_LINKER "} \
60 #define STARTFILE_PREFIX_SPEC \
61 "/lib" XLEN_SPEC "/" ABI_SPEC "/ " \
62 "/usr/lib" XLEN_SPEC "/" ABI_SPEC "/ " \