This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

2. try : mingw32.h patch


Changelog

2001-01-23  Thomas Pfaff <tpfaff@gmx.net>

    * mingw32.h: overwrite STARTFILE_SPEC and LINK_SPEC declared in
cygwin.h.


Mingw32 really does not need a -mno-cygwin switch.
Apply in gcc/config/i386


-- 
Sent through GMX FreeMail - http://www.gmx.net
*** mingw32.h.org	Fri Nov  3 00:29:10 2000
--- mingw32.h	Mon Jan 29 10:20:00 2001
*************** Boston, MA 02111-1307, USA. */
*** 56,68 ****
  #define LIB_SPEC "%{pg:-lgmon} %{mwindows:-lgdi32 -lcomdlg32} \
                    -luser32 -lkernel32 -ladvapi32 -lshell32"
  
  /* 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}"
  
  /* MS runtime does not need a separate math library. */
  #define MATH_LIBRARY ""
--- 56,77 ----
  #define LIB_SPEC "%{pg:-lgmon} %{mwindows:-lgdi32 -lcomdlg32} \
                    -luser32 -lkernel32 -ladvapi32 -lshell32"
  
+ #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 "%{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 ""

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]