diff --git a/gcc/config.sub b/gcc/config.sub
index a21374bb7bf5b5c8bb1ac45625d4917983a5a6ea..1145e2c9ce9262538386bd6771e28156786efc22 100755
--- a/gcc/config.sub
+++ b/gcc/config.sub
@@ -653,7 +653,8 @@ case $os in
 	      | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \
 	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux*)
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -cygwin32* | -pe*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-sunos5*)
diff --git a/gcc/config/i386/cygwin32.asm b/gcc/config/i386/cygwin32.asm
new file mode 100644
index 0000000000000000000000000000000000000000..4ac4c91a3b18d8cff5e27f970b0d25a2f012aa34
--- /dev/null
+++ b/gcc/config/i386/cygwin32.asm
@@ -0,0 +1,32 @@
+/* stuff needed for libgcc1 on win32. */
+
+#ifdef L_chkstk
+
+	.global ___chkstk
+	.global	__alloca
+___chkstk:
+__alloca:
+	pushl  %ecx		/* save temp */
+	movl   %esp,%ecx	/* get sp */
+	addl   $0x8,%ecx	/* and point to return addr */
+
+probe: 	cmpl   $0x1000,%eax	/* > 4k ?*/
+	jb    done		
+
+	subl   $0x1000,%ecx  		/* yes, move pointer down 4k*/
+	orl    $0x0,(%ecx)   		/* probe there */
+	subl   $0x1000,%eax  	 	/* decrement count */
+	jmp    probe           	 	/* and do it again */
+
+done: 	subl   %eax,%ecx	   
+	orl    $0x0,(%ecx)	/* less that 4k, just peek here */
+
+	movl   %esp,%eax
+	movl   %ecx,%esp	/* decrement stack */
+
+	movl   (%eax),%ecx	/* recover saved temp */
+	movl   4(%eax),%eax	/* get return address */
+	jmp    *%eax	
+
+
+#endif
diff --git a/gcc/config/i386/cygwin32.h b/gcc/config/i386/cygwin32.h
new file mode 100644
index 0000000000000000000000000000000000000000..9a5ed33b4db5b25f92c1c5d75ab5745e2042f611
--- /dev/null
+++ b/gcc/config/i386/cygwin32.h
@@ -0,0 +1,204 @@
+/* Operating system specific defines to be used when targeting GCC for
+   hosting on Windows NT 3.x, using a unix style C library and tools.
+
+   This is different to the winnt.h file, since that is used
+   to build GCC for use with a windows style library and tool
+   set, winnt.h uses the Microsoft tools to do that.
+
+   Copyright (C) 1995 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC 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 2, or (at your option)
+any later version.
+
+GNU CC 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 GNU CC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+
+#define YES_UNDERSCORES
+
+#include "i386/gas.h"
+
+
+#ifdef CPP_PREDEFINES
+#undef CPP_PREDEFINES
+#endif
+
+#define CPP_PREDEFINES "-Di386 -D__WIN32__ \
+  -DPOSIX -D__CYGWIN32__ -DWINNT  -D_X86_=1 -D__STDC__=1\
+  -D__stdcall=__attribute__((__stdcall__)) \
+  -D__cdecl=__attribute__((__cdecl__)) \
+  -Asystem(winnt) -Acpu(i386) -Amachine(i386)"
+
+/* We have to dynamic link to get to the system dlls,
+   and I've put all of libc and libm and the unix stuff into
+   cygwin.dll, the import library is called 'libcygwin.a' */
+
+#undef LIB_SPEC
+#define LIB_SPEC "-lcygwin"
+
+/* No need for libgcc, it's in the shared library. */
+#undef LIBGCC_SPEC
+#define LIBGCC_SPEC ""
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "%{!:crt0%O%s}"
+
+#define SIZE_TYPE "unsigned int"
+#define PTRDIFF_TYPE "int"
+#define WCHAR_UNSIGNED 1
+#define WCHAR_TYPE_SIZE 16
+#define WCHAR_TYPE "short unsigned int"
+#undef LONG_DOUBLE_TYPE_SIZE
+#define LONG_DOUBLE_TYPE_SIZE 64
+#define HAVE_ATEXIT 1
+
+#undef EXTRA_SECTIONS
+#define EXTRA_SECTIONS in_ctor, in_dtor
+
+#undef EXTRA_SECTION_FUNCTIONS
+#define EXTRA_SECTION_FUNCTIONS					\
+  CTOR_SECTION_FUNCTION						\
+  DTOR_SECTION_FUNCTION
+
+#define CTOR_SECTION_FUNCTION					\
+void								\
+ctor_section ()							\
+{								\
+  if (in_section != in_ctor)					\
+    {								\
+      fprintf (asm_out_file, "\t.section .ctor\n");		\
+      in_section = in_ctor;					\
+    }								\
+}
+
+#define DTOR_SECTION_FUNCTION					\
+void								\
+dtor_section ()							\
+{								\
+  if (in_section != in_dtor)					\
+    {								\
+      fprintf (asm_out_file, "\t.section .dtor\n");		\
+      in_section = in_dtor;					\
+    }								\
+}
+
+#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME)	\
+  do {						\
+    ctor_section ();				\
+    fprintf (FILE, "%s\t", ASM_LONG);		\
+    assemble_name (FILE, NAME);			\
+    fprintf (FILE, "\n");			\
+  } while (0)
+
+#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME)       	\
+  do {						\
+    dtor_section ();                   		\
+    fprintf (FILE, "%s\t", ASM_LONG);		\
+    assemble_name (FILE, NAME);              	\
+    fprintf (FILE, "\n");			\
+  } while (0)
+
+/* Define this macro if references to a symbol must be treated
+   differently depending on something about the variable or
+   function named by the symbol (such as what section it is in).
+
+   On i386, if using PIC, mark a SYMBOL_REF for a non-global symbol
+   so that we may access it directly in the GOT.
+
+   On i386 running Windows NT, modify the assembler name with a suffix 
+   consisting of an atsign (@) followed by string of digits that represents
+   the number of bytes of arguments passed to the function, if it has the 
+   attribute STDCALL. */
+
+#ifdef ENCODE_SECTION_INFO
+#undef ENCODE_SECTION_INFO
+#define ENCODE_SECTION_INFO(DECL) 					\
+do									\
+  {									\
+    if (flag_pic)							\
+      {									\
+	rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd'		\
+		   ? TREE_CST_RTL (DECL) : DECL_RTL (DECL));		\
+	SYMBOL_REF_FLAG (XEXP (rtl, 0))					\
+	  = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd'			\
+	     || ! TREE_PUBLIC (DECL));					\
+      }									\
+    if (TREE_CODE (DECL) == FUNCTION_DECL) 				\
+      if (lookup_attribute ("stdcall",					\
+			    TYPE_ATTRIBUTES (TREE_TYPE (DECL))))	\
+        XEXP (DECL_RTL (DECL), 0) = 					\
+          gen_rtx (SYMBOL_REF, Pmode, gen_stdcall_suffix (DECL)); 	\
+  }									\
+while (0)
+#endif
+
+/* Emit code to check the stack when allocating more that 20
+   bytes in one go. */
+
+#define CHECK_STACK_LIMIT 20
+
+
+
+/* By default, target has a 80387, uses IEEE compatible arithmetic,
+   and returns float values in the 387 and needs stack probes */
+#undef TARGET_DEFAULT
+
+#define TARGET_DEFAULT \
+   (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_STACK_PROBE) 
+
+#define DBX_DEBUGGING_INFO 
+#define SDB_DEBUGGING_INFO 
+#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+
+
+/* A C statement to output something to the assembler file to switch to section
+   NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or
+   NULL_TREE.  Some target formats do not support arbitrary sections.  Do not
+   define this macro in such cases.  */
+
+#define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME) \
+  fprintf (FILE, "\t.section %s\n", NAME)
+
+#undef  ASM_OUTPUT_SOURCE_LINE
+#define ASM_OUTPUT_SOURCE_LINE(file, line)				\
+do									\
+  {									\
+    static int sym_lineno = 1;						\
+    fprintf (file, "\t.stabn 68,0,%d,.LM%d-",				\
+	     line, sym_lineno);						\
+    assemble_name (file, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \
+    fprintf (file, "\n.LM%d:\n", sym_lineno);				\
+    sym_lineno += 1;							\
+  }									\
+while (0)
+
+/* Generate a blank trailing N_SO to mark the end of the .o file, since
+   we can't depend upon the linker to mark .o file boundaries with
+   embedded stabs.  */
+
+#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME)			\
+  fprintf (FILE,							\
+	   "\t.text\n\t.stabs \"\",%d,0,0,Letext\nLetext:\n", N_SO)
+
+/* Make LBRAC and RBRAC addresses relative to the start of the
+   function.  The native Solaris stabs debugging format works this
+   way, gdb expects it, and it reduces the number of relocation
+   entries.  */
+
+#define DBX_BLOCKS_FUNCTION_RELATIVE 1
+
+/* In order for relative line numbers to work, we must output the
+   stabs entry for the function name first.  */
+
+#define DBX_FUNCTION_FIRST
diff --git a/gcc/config/i386/t-cygwin32 b/gcc/config/i386/t-cygwin32
new file mode 100644
index 0000000000000000000000000000000000000000..cc523cb0522f0893988f1b0354485180e4a43f22
--- /dev/null
+++ b/gcc/config/i386/t-cygwin32
@@ -0,0 +1,9 @@
+# CYGNUS LOCAL entire file
+LIBGCC1 = libgcc1-asm.a
+CROSS_LIBGCC1 = libgcc1-asm.a
+LIB1ASMSRC = i386/cygwin32.asm
+LIB1ASMFUNCS = _chkstk
+
+winnt.o: $(srcdir)/config/i386/winnt.c
+	$(CC) -I. -I$(srcdir) -I$(srcdir)/config -c $(srcdir)/config/i386/winnt.c
+
diff --git a/gcc/config/i386/x-cygwin32 b/gcc/config/i386/x-cygwin32
new file mode 100644
index 0000000000000000000000000000000000000000..b81c1514a08cf79fa4a5f6035c9847416bd27bb8
--- /dev/null
+++ b/gcc/config/i386/x-cygwin32
@@ -0,0 +1,2 @@
+USE_COLLECT2 =
+LANGUAGES=c c++ objective-c
diff --git a/gcc/config/i386/xm-cygwin32.h b/gcc/config/i386/xm-cygwin32.h
new file mode 100644
index 0000000000000000000000000000000000000000..1ee4c47a3fdbe81ee41ecb316560e9b66a2ff256
--- /dev/null
+++ b/gcc/config/i386/xm-cygwin32.h
@@ -0,0 +1,30 @@
+/* Configuration for GNU C-compiler for hosting on Windows NT.
+   using a unix style C library.
+   Copyright (C) 1995 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC 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 2, or (at your option)
+any later version.
+
+GNU CC 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 GNU CC; see the file COPYING.  If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+
+
+#define NO_STAB_H
+
+#include "i386/xm-i386.h"
+
+#define HAVE_STRERROR
+#define HAVE_RUSAGE
+#define HAVE_FILE_H
+
+
diff --git a/gcc/config/rs6000/cygwin32.h b/gcc/config/rs6000/cygwin32.h
new file mode 100644
index 0000000000000000000000000000000000000000..26e96bb7bdc49830773f4e893193ce257bc92dbe
--- /dev/null
+++ b/gcc/config/rs6000/cygwin32.h
@@ -0,0 +1,64 @@
+/* Operating system specific defines to be used when targeting GCC for
+   hosting on Windows NT 3.x, using the Cygnus API 
+
+   This is different to the winnt.h file, since that is used
+   to build GCC for use with a windows style library and tool
+   set, winnt.h uses the Microsoft tools to do that.
+
+   Copyright (C) 1996 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC 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 2, or (at your option)
+any later version.
+
+GNU CC 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 GNU CC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+
+/* Ugly hack */
+#include "rs6000/win-nt.h"
+
+
+#ifdef CPP_PREDEFINES
+#undef CPP_PREDEFINES
+#endif
+
+#define	CPP_PREDEFINES "-DWIN32 -D__WIN32__ -D__WINNT__ \
+  -D__CYGWIN32__ -DPOSIX \
+  -D_POWER -DPPC -Asystem(winnt) -Acpu(powerpc) -Amachine(powerpc)"
+
+/* We have to dynamic link to get to the system dlls,
+   and I've put all of libc and libm and the unix stuff into
+   cygwin.dll, the import library is called 'libcygwin.a' */
+
+#undef LIB_SPEC
+#define LIB_SPEC "-lcygwin"
+
+
+#undef	LINK_SPEC
+#define	LINK_SPEC "%{V} %{v:%{!V:-V}}"
+
+
+/* No need for libgcc, it's in the shared library. */
+#undef LIBGCC_SPEC
+#define LIBGCC_SPEC ""
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "%{!:crt0%O%s}"
+
+#define PTRDIFF_TYPE "int"
+#define WCHAR_UNSIGNED 1
+#define WCHAR_TYPE_SIZE 16
+#define WCHAR_TYPE "short unsigned int"
+
+/* XXX set up stack probing */
diff --git a/gcc/config/rs6000/eabi-ci.asm b/gcc/config/rs6000/eabi-ci.asm
index 175bff6edff946b1e1792e82d74783c87e6dcd19..62008231b608929cf284f42f0434d8de9cb15846 100644
--- a/gcc/config/rs6000/eabi-ci.asm
+++ b/gcc/config/rs6000/eabi-ci.asm
@@ -85,7 +85,7 @@ _SDA_BASE_:
 	.type	__SBSS_START__,@object
 __SBSS_START__:
 
-	.section ".sdata2","aw"
+	.section ".sdata2","a"
 	.weak	_SDA2_BASE_
 	.type	_SDA2_BASE_,@object
 	.globl	__SDATA2_START__
@@ -93,7 +93,7 @@ __SBSS_START__:
 __SDATA2_START__:
 _SDA2_BASE_:
 
-	.section ".sbss2","aw"
+	.section ".sbss2","a",@nobits
 	.globl	__SBSS2_START__
 	.type	__SBSS2_START__,@object
 __SBSS2_START__:
diff --git a/gcc/config/rs6000/eabi-cn.asm b/gcc/config/rs6000/eabi-cn.asm
index 09012dbbc021ef255ef497e69ad047a2e502eeaf..fdcfb62ae2dcb54c775c1cb109dbf17b2ce1fb35 100644
--- a/gcc/config/rs6000/eabi-cn.asm
+++ b/gcc/config/rs6000/eabi-cn.asm
@@ -79,12 +79,12 @@ __SDATA_END__:
 	.type	__SBSS_END__,@object
 __SBSS_END__:
 
-	.section ".sdata2","aw"
+	.section ".sdata2","a"
 	.globl	__SDATA2_END__
 	.type	__SDATA2_END__,@object
 __SDATA2_END__:
 
-	.section ".sbss2","aw"
+	.section ".sbss2","a"
 	.globl	__SBSS2_END__
 	.type	__SBSS2_END__,@object
 __SBSS2_END__: