* x86-tune-sched.c (ix86_adjust_cost): Fix Zen support.
[official-gcc.git] / gcc / config / i386 / darwin64.h
blob32cb789c191a6c02d8b50fe7778da3f4d69dcebe
1 /* Target definitions for x86_64 running Darwin.
2 Copyright (C) 2006-2017 Free Software Foundation, Inc.
3 Contributed by Apple Computer Inc.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
10 any later version.
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
21 #undef DARWIN_ARCH_SPEC
22 #define DARWIN_ARCH_SPEC "%{m32:i386;:x86_64}"
24 /* WORKAROUND pr80556:
25 For x86_64 Darwin10 and later, the unwinder is in libunwind (redirected
26 from libSystem). This doesn't use the keymgr (see keymgr.c) and therefore
27 the calls that libgcc makes to obtain the KEYMGR_GCC3_DW2_OBJ_LIST are not
28 updated to include new images, and might not even be valid for a single
29 image.
30 Therefore, for 64b exes at least, we must use the libunwind implementation,
31 even when static-libgcc is specified. We put libSystem first so that
32 unwinder symbols are satisfied from there. */
33 #undef REAL_LIBGCC_SPEC
34 #define REAL_LIBGCC_SPEC \
35 "%{static-libgcc|static: \
36 %{!m32:%:version-compare(>= 10.6 mmacosx-version-min= -lSystem)} \
37 -lgcc_eh -lgcc; \
38 shared-libgcc|fexceptions|fgnu-runtime: \
39 %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_s.10.4) \
40 %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5) \
41 %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_ext.10.4) \
42 %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext.10.5) \
43 -lgcc ; \
44 :%:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_s.10.4) \
45 %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5) \
46 %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_ext.10.4) \
47 %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext.10.5) \
48 -lgcc }"
50 #undef DARWIN_SUBARCH_SPEC
51 #define DARWIN_SUBARCH_SPEC DARWIN_ARCH_SPEC
53 #undef SUBTARGET_EXTRA_SPECS
54 #define SUBTARGET_EXTRA_SPECS \
55 DARWIN_EXTRA_SPECS \
56 { "darwin_arch", DARWIN_ARCH_SPEC }, \
57 { "darwin_crt2", "" }, \
58 { "darwin_subarch", DARWIN_SUBARCH_SPEC },