190075Sobrien/* Definitions for AMD x86-64 running FreeBSD with ELF format
2169706Skan   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
390075Sobrien   Contributed by David O'Brien <obrien@FreeBSD.org>
490075Sobrien
5132742SkanThis file is part of GCC.
690075Sobrien
7132742SkanGCC is free software; you can redistribute it and/or modify
890075Sobrienit under the terms of the GNU General Public License as published by
990075Sobrienthe Free Software Foundation; either version 2, or (at your option)
1090075Sobrienany later version.
1190075Sobrien
12132742SkanGCC is distributed in the hope that it will be useful,
1390075Sobrienbut WITHOUT ANY WARRANTY; without even the implied warranty of
1490075SobrienMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1590075SobrienGNU General Public License for more details.
1690075Sobrien
1790075SobrienYou should have received a copy of the GNU General Public License
18132742Skanalong with GCC; see the file COPYING.  If not, write to
19169706Skanthe Free Software Foundation, 51 Franklin Street, Fifth Floor,
20169706SkanBoston, MA 02110-1301, USA.  */
2190075Sobrien
2298599Sobrien/* $FreeBSD: releng/10.2/contrib/gcc/config/i386/freebsd64.h 238472 2012-07-15 10:54:10Z kib $ */
2390075Sobrien
2498599Sobrien
25117417Skan#undef  TARGET_VERSION
26182579Sobrien#define TARGET_VERSION fprintf (stderr, " (FreeBSD/amd64 ELF)");
2790075Sobrien
28123546Sobrien#undef  FBSD_TARGET_CPU_CPP_BUILTINS
29123546Sobrien#define FBSD_TARGET_CPU_CPP_BUILTINS()		\
30123546Sobrien  do						\
31123546Sobrien    {						\
32123561Sobrien      if (TARGET_64BIT)				\
33123561Sobrien	{					\
34123561Sobrien	  builtin_define ("__LP64__");		\
35123561Sobrien	}					\
36123546Sobrien    }						\
37123546Sobrien  while (0)
38123546Sobrien
39132742Skan#define SUBTARGET_EXTRA_SPECS \
40132742Skan  { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER }
41132742Skan
4290075Sobrien/* Provide a LINK_SPEC appropriate for the FreeBSD/x86-64 ELF target.
4390075Sobrien   This is a copy of LINK_SPEC from <i386/freebsd.h> tweaked for
4490075Sobrien   the x86-64 target.  */
4590075Sobrien
4690075Sobrien#undef	LINK_SPEC
4790075Sobrien#define LINK_SPEC "\
48132742Skan  %{m32:-m elf_i386_fbsd} \
4990075Sobrien  %{v:-V} \
5090075Sobrien  %{assert*} %{R*} %{rpath*} %{defsym*} \
5190075Sobrien  %{shared:-Bshareable %{h*} %{soname*}} \
5290075Sobrien    %{!shared: \
5390075Sobrien      %{!static: \
5490075Sobrien        %{rdynamic:-export-dynamic} \
55132742Skan	%{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \
5690075Sobrien    %{static:-Bstatic}} \
57238472Skib  %{!static:--hash-style=both --enable-new-dtags} \
5890075Sobrien  %{symbolic:-Bsymbolic}"
59