1 /* Operating system specific defines to be used when targeting GCC for
2 hosting on Windows32, using GNU tools and the Windows32 API Library.
3 Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
5 This file is part of GNU CC.
7 GNU CC 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 2, or (at your option)
12 GNU CC 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 GNU CC; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
22 /* Most of this is the same as for cygwin, except for changing some
25 #include "i386/cygwin.h"
27 #define TARGET_EXECUTABLE_SUFFIX ".exe"
29 /* Please keep changes to CPP_PREDEFINES in sync with i386/crtdll. The
30 only difference between the two should be __MSVCRT__ needed to
31 distinguish MSVC from CRTDLL runtime in mingw headers. */
33 #define CPP_PREDEFINES "-D_WIN32 -DWIN32 \
34 -D__MINGW32__=0.2 -D__MSVCRT__ -DWINNT -D_X86_=1 \
37 /* Specific a different directory for the standard include files. */
38 #undef STANDARD_INCLUDE_DIR
39 #define STANDARD_INCLUDE_DIR "/usr/local/i386-mingw32/include"
41 #define STANDARD_INCLUDE_COMPONENT "MINGW32"
45 "-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT} \
46 -D__stdcall=__attribute__((__stdcall__)) \
47 -D__cdecl=__attribute__((__cdecl__)) \
48 %{!ansi:-D_stdcall=__attribute__((__stdcall__)) \
49 -D_cdecl=__attribute__((__cdecl__))} \
50 -D__declspec(x)=__attribute__((x))"
53 /* For Windows applications, include more libraries, but always include
56 #define LIB_SPEC "%{pg:-lgmon} %{mwindows:-lgdi32 -lcomdlg32} \
57 -luser32 -lkernel32 -ladvapi32 -lshell32"
59 /* Include in the mingw32 libraries with libgcc */
61 #define LINK_SPEC "%{mwindows:--subsystem windows} \
62 %{mconsole:--subsystem console} \
63 %{shared: %{mdll: %eshared and mdll are not compatible}} \
64 %{shared: --shared} %{mdll:--dll} \
65 %{static:-Bstatic} %{!static:-Bdynamic} \
66 %{shared|mdll: -e _DllMainCRTStartup@12}"
68 /* Include in the mingw32 libraries with libgcc */
71 "%{mthreads:-lmingwthrd} -lmingw32 -lgcc -lmoldname -lmsvcrt"
74 #define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \
75 %{!shared:%{!mdll:crt2%O%s}} %{pg:gcrt2%O%s}"
77 /* MS runtime does not need a separate math library. */
78 #define MATH_LIBRARY ""
80 /* Output STRING, a string representing a filename, to FILE. We canonicalize
81 it to be in MS-DOS format. */
82 #define OUTPUT_QUOTED_STRING(FILE, STRING) \
86 putc ('\"', asm_file); \
88 while ((c = *string++) != 0) \
94 putc ('\\', asm_file); \
98 putc ('\"', asm_file); \
101 /* Override Cygwin's definition. This is necessary now due to the way
102 Cygwin profiling code is written. Once "fixed", we can remove this. */
103 #undef SUBTARGET_PROLOGUE