summaryrefslogtreecommitdiffstats
path: root/gcc45-mnocygwin.diff
blob: 3dd13b5f22ba0fe6526f95594b3931a613113f03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
diff -pruN origsrc/gcc-4.5.0/gcc/config.gcc src/gcc-4.5.0/gcc/config.gcc
--- origsrc/gcc-4.5.0/gcc/config.gcc	2010-04-07 11:34:00.000000000 +0100
+++ src/gcc-4.5.0/gcc/config.gcc	2010-04-20 07:29:42.921875000 +0100
@@ -1329,8 +1329,8 @@ i[34567]86-*-pe | i[34567]86-*-cygwin*)
 	target_gtfiles="\$(srcdir)/config/i386/winnt.c"
 	extra_options="${extra_options} i386/cygming.opt"
 	extra_objs="winnt.o winnt-stubs.o"
-	c_target_objs="${c_target_objs} cygwin2.o msformat-c.o"
-	cxx_target_objs="${cxx_target_objs} cygwin2.o winnt-cxx.o msformat-c.o"
+	c_target_objs="${c_target_objs} msformat-c.o"
+	cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
 	extra_gcc_objs=cygwin1.o
 	if test x$enable_threads = xyes; then
 		thread_file='posix'
diff -pruN origsrc/gcc-4.5.0/gcc/config/i386/cygwin1.c src/gcc-4.5.0/gcc/config/i386/cygwin1.c
--- origsrc/gcc-4.5.0/gcc/config/i386/cygwin1.c	2009-02-20 15:20:38.000000000 +0000
+++ src/gcc-4.5.0/gcc/config/i386/cygwin1.c	2010-04-19 04:13:04.578125000 +0100
@@ -38,16 +38,8 @@ mingw_scan (int argc ATTRIBUTE_UNUSED,
       putenv (xstrdup ("GCC_CYGWIN_WIN32=1"));
     else if (strcmp (*argv, "-mno-cygwin") == 0)
       {
-	char *p = strstr (*spec_machine, "-cygwin");
-	if (p)
-	  {
-	    int len = p - *spec_machine;
-	    char *s = XNEWVEC (char, strlen (*spec_machine) + 3);
-	    memcpy (s, *spec_machine, len);
-	    strcpy (s + len, "-mingw32");
-	    *spec_machine = s;
-	  }
-	putenv (xstrdup ("GCC_CYGWIN_MINGW=1"));
+	fatal ("The -mno-cygwin flag has been removed; use a "
+	  "mingw-targeted cross-compiler.\n");
       }
   return;
 }
diff -pruN origsrc/gcc-4.5.0/gcc/config/i386/cygwin2.c src/gcc-4.5.0/gcc/config/i386/cygwin2.c
--- origsrc/gcc-4.5.0/gcc/config/i386/cygwin2.c	2007-08-02 11:49:31.000000000 +0100
+++ src/gcc-4.5.0/gcc/config/i386/cygwin2.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,66 +0,0 @@
-/* Helper routines for cygwin-specific command-line parsing.
-   Contributed by Christopher Faylor (cgf@redhat.com)
-   Copyright 2003, 2007 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING3.  If not see
-<http://www.gnu.org/licenses/>.  */
-
-#include "config.h"
-#include "system.h"
-#include "coretypes.h"
-#include "tm.h"
-
-#include "safe-ctype.h"
-#include <string.h>
-
-/*
-static void remove_w32api (void);
-*/
-static void add_mingw (void);
-static void set_mingw (void) __attribute__ ((constructor));
-
-static void
-add_mingw (void)
-{
-  char **av;
-  char *p;
-  for (av = cvt_to_mingw; *av; av++)
-    {
-      int sawcygwin = 0;
-      while ((p = strstr (*av, "-cygwin")))
-	{
-	  char *over = p + sizeof ("-cygwin") - 1;
-	  memmove (over + 1, over, strlen (over));
-	  memcpy (p, "-mingw32", sizeof("-mingw32") - 1);
-	  p = ++over;
-	  while (ISALNUM (*p))
-	    p++;
-	  strcpy (over, p);
-	  sawcygwin = 1;
-	}
-      if (!sawcygwin && !strstr (*av, "mingw"))
-	strcat (*av, CYGWIN_MINGW_SUBDIR);
-    }
-}
-
-
-static void
-set_mingw (void)
-{
-  char *env = getenv ("GCC_CYGWIN_MINGW");
-  if (env && *env == '1')
-    add_mingw ();
-}
diff -pruN origsrc/gcc-4.5.0/gcc/config/i386/t-cygwin src/gcc-4.5.0/gcc/config/i386/t-cygwin
--- origsrc/gcc-4.5.0/gcc/config/i386/t-cygwin	2009-05-26 15:02:04.000000000 +0100
+++ src/gcc-4.5.0/gcc/config/i386/t-cygwin	2010-04-19 04:28:35.406250000 +0100
@@ -28,10 +28,6 @@ cygwin1.o: $(srcdir)/config/i386/cygwin1
 	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
 	$(srcdir)/config/i386/cygwin1.c
 
-cygwin2.o: $(srcdir)/config/i386/cygwin2.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
-  $(TM_H) $(TM_P_H)
-	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-	$(srcdir)/config/i386/cygwin2.c
 
 # Cygwin-specific parts of LIB_SPEC
 SHLIB_LC = -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32