1 /* Definitions of target machine for GCC,
2 for x86-64/ELF NetBSD systems.
3 Copyright (C) 2002-2017 Free Software Foundation, Inc.
4 Contributed by Wasabi Systems, Inc.
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
13 GCC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. */
22 #define TARGET_OS_CPP_BUILTINS() \
25 NETBSD_OS_CPP_BUILTINS_ELF(); \
30 /* Extra specs needed for NetBSD/x86-64 ELF. */
32 #undef SUBTARGET_EXTRA_SPECS
33 #define SUBTARGET_EXTRA_SPECS \
34 { "netbsd_cpp_spec", NETBSD_CPP_SPEC }, \
35 { "netbsd_link_spec", NETBSD_LINK_SPEC_ELF }, \
36 { "netbsd_entry_point", NETBSD_ENTRY_POINT },
39 /* Provide a LINK_SPEC appropriate for a NetBSD/x86-64 ELF target. */
44 %{m64:-m elf_x86_64} \
47 #define NETBSD_ENTRY_POINT "_start"
50 /* Provide a CPP_SPEC appropriate for NetBSD. */
53 #define CPP_SPEC "%(netbsd_cpp_spec)"
56 /* Output assembler code to FILE to call the profiler. */
58 #undef FUNCTION_PROFILER
59 #define FUNCTION_PROFILER(FILE, LABELNO) \
61 if (TARGET_64BIT && flag_pic) \
62 fprintf (FILE, "\tcall *__mcount@PLT\n"); \
64 fprintf (FILE, "\tcall *__mcount@PLT\n"); \
66 fprintf (FILE, "\tcall __mcount\n"); \
69 #define HAVE_ENABLE_EXECUTE_STACK