1 /* Operating system specific defines to be used when targeting GCC for
2 hosting on Windows 32/64 via Cygwin runtime, using GNU tools and
3 the Windows API Library.
4 Copyright (C) 2013-2015 Free Software Foundation, 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 /* Enable multilib. */
25 #define ASM_SPEC "%{m32:--32} %{m64:--64}"
27 /* To implement C++ function replacement we always wrap the cxx
28 malloc-like operators. See N2800 #17.6.4.6 [replacement.functions] */
29 #undef CXX_WRAP_SPEC_LIST
30 #define CXX_WRAP_SPEC_LIST " \
35 --wrap _ZnwmRKSt9nothrow_t \
36 --wrap _ZnamRKSt9nothrow_t \
37 --wrap _ZdlPvRKSt9nothrow_t \
38 --wrap _ZdaPvRKSt9nothrow_t \
44 #define SPEC_64 "!m32"
46 #undef SUB_LINK_ENTRY32
47 #undef SUB_LINK_ENTRY64
48 #define SUB_LINK_ENTRY32 "-e __cygwin_dll_entry@12"
49 #define SUB_LINK_ENTRY64 "-e _cygwin_dll_entry"
53 #define SUB_LINK_SPEC "%{" SPEC_64 ":-m i386pep} %{" SPEC_32 ":-m i386pe}"
54 #define SUB_LINK_ENTRY "%{" SPEC_64 ":" SUB_LINK_ENTRY64 "} %{" SPEC_32 ":" SUB_LINK_ENTRY32 "}"
56 #undef MULTILIB_DEFAULTS
57 #define MULTILIB_DEFAULTS { "m64" }
60 #define LINK_SPEC SUB_LINK_SPEC "\
61 %{mwindows:--subsystem windows} \
62 %{mconsole:--subsystem console} \
64 %{shared: %{mdll: %eshared and mdll are not compatible}} \
65 %{shared: --shared} %{mdll:--dll} \
66 %{static:-Bstatic} %{!static:-Bdynamic} \
67 %{shared|mdll: " SUB_LINK_ENTRY " --enable-auto-image-base} \
68 %(shared_libgcc_undefs) \
69 --dll-search-prefix=cyg \
70 %{!shared: %{!mdll: %{" SPEC_32 ":--large-address-aware} --tsaware}}"
72 /* Cygwin64 will have a 64-bit long type. */
75 #define LONG_TYPE_SIZE (TARGET_64BIT ? 64 : 32)
77 /* Override default "long long unsigned int" from cygming.h. */
79 #define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
81 #define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int")
84 #define LIBGCC_SONAME "cyggcc_s-seh-1.dll"