This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
win32 patch 3 -- mingw specs cleanup/fix
- To: egcs-patches at cygnus dot com
- Subject: win32 patch 3 -- mingw specs cleanup/fix
- From: Mumit Khan <khan at xraylith dot wisc dot edu>
- Date: Sat, 05 Sep 1998 11:23:24 -0500
The following fixes up the specs for mingw32msvc and mingw32crtdll (the
default) configurations. The only different between the two CPP_PREDEFINE
should be __MSVCRT__. Without this, anybody building i386-mingw32msvc
don't get a gcc that predefines __MSVCRT__ and that's wrong.
Regards,
Mumit -- khan@xraylith.wisc.edu
Wed Sep 2 19:11:11 1998 Mumit Khan <khan@xraylith.wisc.edu>
* i386/mingw32.h (CPP_PREDEFINES): Add __MSVCRT__ for msvc
runtime.
* i386/crtdll.h (CPP_PREDEFINES): Define.
Index: egcs-1.1/gcc/config/i386//crtdll.h
===================================================================
RCS file: /mounts/sda7/src/gnu/CVSROOT/egcs-1.1/gcc/config/i386/crtdll.h,v
retrieving revision 1.1.1.1
diff -u -3 -p -r1.1.1.1 crtdll.h
--- egcs-1.1/gcc/config/i386/crtdll.h 1998/09/01 19:41:13 1.1.1.1
+++ egcs-1.1/gcc/config/i386/crtdll.h 1998/09/03 00:07:50
@@ -22,6 +22,15 @@ along with GNU CC; see the file COPYING.
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES "-Di386 -D_WIN32 -DWIN32 -D__WIN32__ \
+ -D__MINGW32__ -DWINNT -D_X86_=1 -D__STDC__=1\
+ -D__stdcall=__attribute__((__stdcall__)) \
+ _D_stdcall=__attribute__((__stdcall__)) \
+ -D__cdecl=__attribute__((__cdecl__)) \
+ -D__declspec(x)=__attribute__((x)) \
+ -Asystem(winnt) -Acpu(i386) -Amachine(i386)"
+
#undef LIBGCC_SPEC
#define LIBGCC_SPEC "-lmingw32 -lgcc -lmoldname -lcrtdll"
Index: egcs-1.1/gcc/config/i386//mingw32.h
===================================================================
RCS file: /mounts/sda7/src/gnu/CVSROOT/egcs-1.1/gcc/config/i386/mingw32.h,v
retrieving revision 1.1.1.1
diff -u -3 -p -r1.1.1.1 mingw32.h
--- egcs-1.1/gcc/config/i386/mingw32.h 1998/09/01 19:41:13 1.1.1.1
+++ egcs-1.1/gcc/config/i386/mingw32.h 1998/09/03 00:10:26
@@ -26,10 +26,14 @@ Boston, MA 02111-1307, USA. */
#include "i386/cygwin32.h"
+/* Please keep changes to CPP_PREDEFINES in sync with i386/crtdll. The
+ only difference between the two should be __MSVCRT__ needed to
+ distinguish MSVC from CRTDLL runtime in mingw headers. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Di386 -D_WIN32 -DWIN32 -D__WIN32__ \
- -D__MINGW32__ -DWINNT -D_X86_=1 -D__STDC__=1\
+ -D__MINGW32__ -D__MSVCRT__ -DWINNT -D_X86_=1 -D__STDC__=1\
-D__stdcall=__attribute__((__stdcall__)) \
+ _D_stdcall=__attribute__((__stdcall__)) \
-D__cdecl=__attribute__((__cdecl__)) \
-D__declspec(x)=__attribute__((x)) \
-Asystem(winnt) -Acpu(i386) -Amachine(i386)"