OSDN Git Service

* config/i386/i386.c (ix86_expand_setcc): Don't use method 0
[pf3gnuchains/gcc-fork.git] / gcc / config / i386 / mingw32.h
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.
4
5 This file is part of GNU CC.
6
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)
10 any later version.
11
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.
16
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. */
21
22 /* Most of this is the same as for cygwin, except for changing some
23    specs.  */
24
25 #include "i386/cygwin.h"
26
27 #define TARGET_EXECUTABLE_SUFFIX ".exe"
28
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. */
32 #undef CPP_PREDEFINES
33 #define CPP_PREDEFINES "-D_WIN32 -DWIN32 \
34   -D__MINGW32__=0.2 -D__MSVCRT__ -DWINNT -D_X86_=1 \
35   -Asystem=winnt"
36
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"
40
41 #define STANDARD_INCLUDE_COMPONENT "MINGW32"
42
43 #undef CPP_SPEC
44 #define CPP_SPEC \
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))"
51
52
53 /* For Windows applications, include more libraries, but always include
54    kernel32.  */
55 #undef LIB_SPEC
56 #define LIB_SPEC "%{pg:-lgmon} %{mwindows:-lgdi32 -lcomdlg32} \
57                   -luser32 -lkernel32 -ladvapi32 -lshell32"
58
59 /* Include in the mingw32 libraries with libgcc */
60 #undef LINK_SPEC
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}"
67
68 /* Include in the mingw32 libraries with libgcc */
69 #undef LIBGCC_SPEC
70 #define LIBGCC_SPEC \
71   "%{mthreads:-lmingwthrd} -lmingw32 -lgcc -lmoldname -lmsvcrt"
72
73 #undef STARTFILE_SPEC
74 #define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \
75   %{!shared:%{!mdll:crt2%O%s}} %{pg:gcrt2%O%s}"
76
77 /* MS runtime does not need a separate math library. */
78 #define MATH_LIBRARY ""
79
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) \
83 do {                                            \
84   char c;                                       \
85                                                 \
86   putc ('\"', asm_file);                        \
87                                                 \
88   while ((c = *string++) != 0)                  \
89     {                                           \
90       if (c == '\\')                            \
91         c = '/';                                \
92                                                 \
93       if (c == '\"')                            \
94         putc ('\\', asm_file);                  \
95       putc (c, asm_file);                       \
96     }                                           \
97                                                 \
98   putc ('\"', asm_file);                        \
99 } while (0)
100
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
104