1 /* Definitions for AArch64 running NetBSD
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it
7 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, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 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 #ifndef GCC_AARCH64_NETBSD_H
21 #define GCC_AARCH64_NETBSD_H
23 #define TARGET_LINKER_BIG_EMULATION "aarch64nbsdb"
24 #define TARGET_LINKER_LITTLE_EMULATION "aarch64nbsd"
26 #if TARGET_BIG_ENDIAN_DEFAULT
27 #define TARGET_LINKER_EMULATION TARGET_LINKER_BIG_EMULATION
29 #define TARGET_LINKER_EMULATION TARGET_LINKER_LITTLE_EMULATION
32 #undef SUBTARGET_EXTRA_LINK_SPEC
33 #define SUBTARGET_EXTRA_LINK_SPEC " -m" TARGET_LINKER_EMULATION
35 #define NETBSD_ENTRY_POINT "__start"
37 #define NETBSD_TARGET_LINK_SPEC "%{h*} " \
38 "-X %{mbig-endian:-EB -m " TARGET_LINKER_BIG_EMULATION "} " \
39 "%{mlittle-endian:-EL -m " TARGET_LINKER_LITTLE_EMULATION "} " \
43 #define LINK_SPEC NETBSD_LINK_SPEC_ELF \
44 NETBSD_TARGET_LINK_SPEC \
45 AARCH64_ERRATA_LINK_SPEC
47 #undef TARGET_OS_CPP_BUILTINS
48 #define TARGET_OS_CPP_BUILTINS() \
51 NETBSD_OS_CPP_BUILTINS_ELF(); \
55 #undef SUBTARGET_CPP_SPEC
56 #define SUBTARGET_CPP_SPEC NETBSD_CPP_SPEC
60 { "asm_cpu_spec", ASM_CPU_SPEC }, \
61 NETBSD_SUBTARGET_EXTRA_SPECS
63 #endif /* GCC_AARCH64_NETBSD_H */