cygwin.h (SUBTARGET_SWITCHES): Add -mconsole; fix -mno-nop-fun-dllimport and minor...
authorMumit Khan <khan@xraylith.wisc.edu>
Mon, 12 Apr 1999 18:18:06 +0000 (18:18 +0000)
committerJeff Law <law@gcc.gnu.org>
Mon, 12 Apr 1999 18:18:06 +0000 (12:18 -0600)
        * i386/cygwin.h (SUBTARGET_SWITCHES): Add -mconsole; fix
        -mno-nop-fun-dllimport and minor doc fixes.
        (STARTFILE_SPEC): Cygwin DLLs don't have dllcrt0.
        (LINK_SPEC): Add -mconsole support.
        * i386/mingw32.h (LIB_SPEC): Make libraries consistent with
        Cygwin.
        (LINK_SPEC): Remove. Use Cygwin's version.
        (MATH_LIBRARY): Make it null.
        * i386/crtdll.h (MATH_LIBRARY): Likewise.

From-SVN: r26378

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

index 9ac08aae141b16da5b42cb66aaca6ee103087580..6547e8930796e99f9b808ed149ee4609ac1f6dfa 100644 (file)
@@ -1,3 +1,15 @@
+Mon Apr 12 19:11:38 1999  Mumit Khan  <khan@xraylith.wisc.edu>
+
+       * i386/cygwin.h (SUBTARGET_SWITCHES): Add -mconsole; fix
+       -mno-nop-fun-dllimport and minor doc fixes.
+       (STARTFILE_SPEC): Cygwin DLLs don't have dllcrt0.
+       (LINK_SPEC): Add -mconsole support.
+       * i386/mingw32.h (LIB_SPEC): Make libraries consistent with 
+       Cygwin.
+       (LINK_SPEC): Remove. Use Cygwin's version.
+       (MATH_LIBRARY): Make it null.
+       * i386/crtdll.h (MATH_LIBRARY): Likewise.
+
 Fri Apr  12 15:00:52 1999  Stan Cox  <scox@cygnus.com>
 
        * c-decl.c (c_decode_option, start_decl, start_function,
index 4334da0bd91cb2de5a707c01583c9cf530687946..3202af8cca84d66f46d704695b78b7d3a088dafd 100644 (file)
@@ -38,5 +38,3 @@ Boston, MA 02111-1307, USA. */
 #undef STARTFILE_SPEC
 #define STARTFILE_SPEC "%{mdll:dllcrt1%O%s} %{!mdll:crt1%O%s}"
 
-#undef MATH_LIBRARY
-#define MATH_LIBRARY "-lcrtdll"
index 78baefc4c4617149bc91d9c95446f2a6c81001fb..48b9eba1b1c680aa9e3fb6d825826d867422a1c2 100644 (file)
@@ -45,12 +45,13 @@ Boston, MA 02111-1307, USA. */
 
 #undef  SUBTARGET_SWITCHES
 #define SUBTARGET_SWITCHES \
-{ "no-cygwin",                       MASK_WIN32, "Use the Mingw32 interface" }, \
-{ "cygwin",                          MASK_CYGWIN, "Use the Cygwin interface" },  \
-{ "windows",                         MASK_WINDOWS, "Use the bare Windows interface" }, \
-{ "dll",                             MASK_DLL, "Generate code for a DLL" },     \
-{ "nop-fun-dllimport",               MASK_NOP_FUN_DLLIMPORT, "Ignore dllimport for functions" }, \
-{ "no-nop-fun-dllimport",            MASK_NOP_FUN_DLLIMPORT, "" },
+{ "cygwin",              MASK_CYGWIN, "Use the Cygwin interface" },  \
+{ "no-cygwin",           MASK_WIN32, "Use the Mingw32 interface" }, \
+{ "windows",             MASK_WINDOWS, "Create GUI application" }, \
+{ "console",             -MASK_WINDOWS, "Create console application" }, \
+{ "dll",                 MASK_DLL, "Generate code for a DLL" },     \
+{ "nop-fun-dllimport",   MASK_NOP_FUN_DLLIMPORT, "Ignore dllimport for functions" }, \
+{ "no-nop-fun-dllimport", -MASK_NOP_FUN_DLLIMPORT, "" },
 
 
 /* Support the __declspec keyword by turning them into attributes.
@@ -78,8 +79,7 @@ Boston, MA 02111-1307, USA. */
    by calling the init function from the prologue. */
 
 #undef STARTFILE_SPEC
-#define STARTFILE_SPEC "%{mdll: %{!mno-cygwin:dllcrt0%O%s} \
-                                %{mno-cygwin:dllcrt1%O%s}} \
+#define STARTFILE_SPEC "%{mdll: %{mno-cygwin:dllcrt1%O%s}} \
                         %{!mdll: %{!mno-cygwin:crt0%O%s} \
                                  %{mno-cygwin:crt1%O%s} %{pg:gcrt0%O%s}}"
 
@@ -117,6 +117,7 @@ Boston, MA 02111-1307, USA. */
                  -luser32 -lkernel32 -ladvapi32 -lshell32"
 
 #define LINK_SPEC "%{mwindows:--subsystem windows} \
+                   %{mconsole:--subsystem console} \
                    %{mdll:--dll -e _DllMainCRTStartup@12}"
 
 
index f8da4894ad072dacfd4ff1ed342a7c3b5b105543..552cbcd1932e125a42776911c961bce5012e8acf 100644 (file)
@@ -50,22 +50,18 @@ Boston, MA 02111-1307, USA. */
 /* For Windows applications, include more libraries, but always include
    kernel32.  */
 #undef LIB_SPEC
-#define LIB_SPEC \
-"%{mwindows:-luser32 -lgdi32 -lcomdlg32} -lkernel32 -ladvapi32 -lshell32"
+#define LIB_SPEC "%{mwindows:-lgdi32 -lcomdlg32} \
+                  -luser32 -lkernel32 -ladvapi32 -lshell32"
 
 /* Include in the mingw32 libraries with libgcc */
 #undef LIBGCC_SPEC
 #define LIBGCC_SPEC "-lmingw32 -lgcc -lmoldname -lmsvcrt"
 
-/* Specify a different entry point when linking a DLL */
-#undef LINK_SPEC
-#define LINK_SPEC \
-"%{mwindows:--subsystem windows} %{mdll:--dll -e _DllMainCRTStartup@12}"
-
 #undef STARTFILE_SPEC
 #define STARTFILE_SPEC "%{mdll:dllcrt2%O%s} %{!mdll:crt2%O%s}"
 
-#define MATH_LIBRARY "-lmsvcrt"
+/* MS runtime does not need a separate math library. */
+#define MATH_LIBRARY ""
 
 /* Output STRING, a string representing a filename, to FILE.  We canonicalize
    it to be in MS-DOS format.  */