OSDN Git Service

2009-04-26 Kai Tietz <kai.tietz@onevision.com>
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 26 Apr 2009 13:50:12 +0000 (13:50 +0000)
committerktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 26 Apr 2009 13:50:12 +0000 (13:50 +0000)
* config/i386/mingw-w64.h (STANDARD_INCLUDE_DIR):
Redefine it to just use mingw/include.
(ASM_SPEC): Rules for -m32 and -m64.
(LINK_SPEC): Use Likewise.
(SPEC_32): New define.
(SPEC_64): Likewise.
(SUB_LINK_SPEC): Likewise.
(MULTILIB_DEFAULTS): New define.
* config/i386/t-mingw-w64 (MULTILIB_OPTIONS):
Add multilib options.
(MULTILIB_DIRNAMES): Likewise.
(MULTILIB_OSDIRNAMES): Likewise.
(LIBGCC): Likewise.
(INSTALL_LIBGCC): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146801 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/mingw-w64.h
gcc/config/i386/t-mingw-w64

index 26e6d31..64405d3 100644 (file)
@@ -1,3 +1,20 @@
+2009-04-26  Kai Tietz  <kai.tietz@onevision.com>
+
+       * config/i386/mingw-w64.h (STANDARD_INCLUDE_DIR):
+       Redefine it to just use mingw/include.
+       (ASM_SPEC): Rules for -m32 and -m64.
+       (LINK_SPEC): Use Likewise.
+       (SPEC_32): New define.
+       (SPEC_64): Likewise.
+       (SUB_LINK_SPEC): Likewise.
+       (MULTILIB_DEFAULTS): New define.
+       * config/i386/t-mingw-w64 (MULTILIB_OPTIONS):
+       Add multilib options.
+       (MULTILIB_DIRNAMES): Likewise.
+       (MULTILIB_OSDIRNAMES): Likewise.
+       (LIBGCC): Likewise.
+       (INSTALL_LIBGCC): Likewise.
+
 2009-04-26  Joseph Myers  <joseph@codesourcery.com>
 
        PR c/39556
index 9a2b32e..458b474 100644 (file)
@@ -32,3 +32,38 @@ along with GCC; see the file COPYING3.  If not see
   %{!shared:%{!mdll:%{municode:crt2u%O%s}}} \
   %{pg:gcrt2%O%s} \
   crtbegin.o%s"
+
+/* Use mingw/include for include.  */
+#undef STANDARD_INCLUDE_DIR
+#define STANDARD_INCLUDE_DIR "/mingw/include"
+
+/* Enable multilib.  */
+
+#undef ASM_SPEC
+#define ASM_SPEC "%{v:-V} %{n} %{T} %{Ym,*} %{Yd,*} \
+ %{Wa,*:%*} %{m32:--32} %{m64:--64}"
+
+#if TARGET_64BIT_DEFAULT
+#define SPEC_32 "m32"
+#define SPEC_64 "!m32"
+#else
+#define SPEC_32 "!m64"
+#define SPEC_64 "m64"
+#endif
+
+#define SUB_LINK_SPEC "%{" SPEC_64 ":-m i386pep} %{" SPEC_32 ":-m i386pe}"
+
+#if TARGET_64BIT_DEFAULT
+#define MULTILIB_DEFAULTS { "m64" }
+#else
+#define MULTILIB_DEFAULTS { "m32" }
+#endif
+
+#undef LINK_SPEC
+#define LINK_SPEC SUB_LINK_SPEC "%{mwindows:--subsystem windows} \
+  %{mconsole:--subsystem console} \
+  %{shared: %{mdll: %eshared and mdll are not compatible}} \
+  %{shared: --shared} %{mdll:--dll} \
+  %{static:-Bstatic} %{!static:-Bdynamic} \
+  %{shared|mdll: -e _DllMainCRTStartup@12 --enable-auto-image-base} \
+  %(shared_libgcc_undefs)"
index bfe1506..dbbe00a 100644 (file)
@@ -1,5 +1,12 @@
 # Match SYSTEM_INCLUDE_DIR
 NATIVE_SYSTEM_HEADER_DIR = /mingw/include
 
+MULTILIB_OPTIONS = m64/m32
+MULTILIB_DIRNAMES = 64 32
+MULTILIB_OSDIRNAMES = ../lib64 ../lib32
+
 # MinGW-specific parts of LIB_SPEC
 SHLIB_LC = -lmingw32 -lmingwex -lmoldname -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib