]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/config/i386/netbsd64.h
1 /* Definitions of target machine for GNU compiler,
2 for x86-64/ELF NetBSD systems.
3 Copyright (C) 2002 Free Software Foundation, Inc.
4 Contributed by Wasabi Systems, Inc.
6 This file is part of GNU CC.
8 GNU CC 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 2, or (at your option)
13 GNU CC 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 GNU CC; see the file COPYING. If not, write to
20 the Free Software Foundation, 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
24 /* Provide a LINK_SPEC appropriate for a NetBSD/x86-64 ELF target.
25 This is a copy of LINK_SPEC from <netbsd-elf.h> tweaked for
30 "%{!m32:-m elf_x86_64} \
40 %{rdynamic:-export-dynamic} \
41 %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
45 /* Names to predefine in the preprocessor for this target machine. */
47 #define CPP_PREDEFINES \
48 "-D__NetBSD__ -D__ELF__ -Asystem=unix -Asystem=NetBSD"
51 /* Provide some extra CPP specs needed by NetBSD/x86_64. */
52 #define CPP_LP64_SPEC "%{!m32:-D_LP64}"
54 #define CPP_SUBTARGET_SPEC "%(cpp_lp64)"
56 #undef SUBTARGET_EXTRA_SPECS
57 #define SUBTARGET_EXTRA_SPECS \
58 { "cpp_lp64", CPP_LP64_SPEC }, \
59 { "cpp_subtarget", CPP_SUBTARGET_SPEC },
62 /* Provide a CPP_SPEC appropriate for NetBSD. Currently we deal with
63 our subtarget specs and the GCC option `-posix'. */
66 #define CPP_SPEC "%(cpp_cpu) %(cpp_subtarget) %{posix:-D_POSIX_SOURCE}"
69 /* Output assembler code to FILE to call the profiler. */
71 #undef FUNCTION_PROFILER
72 #define FUNCTION_PROFILER(FILE, LABELNO) \
74 if (TARGET_64BIT && flag_pic) \
75 fprintf (FILE, "\tcall *__mcount@PLT\n"); \
77 fprintf (FILE, "\tcall *__mcount@PLT\n"); \
79 fprintf (FILE, "\tcall __mcount\n"); \
83 #define TARGET_VERSION fprintf (stderr, " (NetBSD/x86_64 ELF)");