mingw32.h: Override STARTFILE_SPEC and LINK_SPEC declared in cygwin.h.
authorThomas Pfaff <tpfaff@gmx.net>
Mon, 29 Jan 2001 21:41:46 +0000 (21:41 +0000)
committerDJ Delorie <dj@gcc.gnu.org>
Mon, 29 Jan 2001 21:41:46 +0000 (16:41 -0500)
* mingw32.h: Override STARTFILE_SPEC and LINK_SPEC declared in
cygwin.h.

From-SVN: r39336

gcc/ChangeLog
gcc/config/i386/mingw32.h

index 969ed8d37e3da681a41a851a82fd4dc3227f0411..accb176945d35a61e07456512c24076c0982b92b 100644 (file)
@@ -1,3 +1,8 @@
+2001-01-29  Thomas Pfaff  <tpfaff@gmx.net>
+
+       * mingw32.h: Override STARTFILE_SPEC and LINK_SPEC declared in
+       cygwin.h.
+
 2001-01-29  Jeffrey Oldham  <oldham@codesourcery.com>
 
        * config/mips/iris6.h (SUPPORTS_INIT_PRIORITY): Revise definition
index f8268e21dd6082c17c0ac9b7845c2fa8b42af8bd..56d8fbd44df3bb83a12463454d39fd626ae0f465 100644 (file)
@@ -56,13 +56,23 @@ Boston, MA 02111-1307, USA. */
 #define LIB_SPEC "%{pg:-lgmon} %{mwindows:-lgdi32 -lcomdlg32} \
                   -luser32 -lkernel32 -ladvapi32 -lshell32"
 
+/* Include in the mingw32 libraries with libgcc */
+#undef LINK_SPEC
+#define 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}"
+
 /* Include in the mingw32 libraries with libgcc */
 #undef LIBGCC_SPEC
 #define LIBGCC_SPEC \
   "%{mthreads:-lmingwthrd} -lmingw32 -lgcc -lmoldname -lmsvcrt"
 
 #undef STARTFILE_SPEC
-#define STARTFILE_SPEC "%{mdll:dllcrt2%O%s} %{!mdll:crt2%O%s} %{pg:gcrt2%O%s}"
+#define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \
+  %{!shared:%{!mdll:crt2%O%s}} %{pg:gcrt2%O%s}"
 
 /* MS runtime does not need a separate math library. */
 #define MATH_LIBRARY ""