Subject: bug#6715: 24.0.50; [PATCH] Cygwin build should use pre-crt0.c

From: Ken Brown <[email-masked]>
Date: Sat, 24 Jul 2010 08:22:40 -0400

On 7/24/2010 1:13 AM, Dan Nicolaescu wrote:
> BTW, it would be good if you could look at configure.in and see if the
> line:
>
>    cygwin) LINKER="\$(CC)" ;;
>
> [Just trying to remove special cases from the build system to simplify it...]

There's no need for cygwin to be a special case here.  Fixing this also 
makes the cygwin case irrelevant in the code that sets LIB_GCC a little 
further down in configure.in.  Please apply the attached patch.

Thanks.

Ken
--- configure.in.orig	2010-07-23 21:46:35.000000000 -0400
+++ configure.in	2010-07-24 07:54:29.328125000 -0400
@@ -3326,9 +3326,7 @@
 ORDINARY_LINK=
 case "$opsys" in
   ## gnu: GNU needs its own crt0.
-  aix4-2|darwin|gnu|usg5-4|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;;
-
-  cygwin) LINKER="\$(CC)" ;;
+  aix4-2|cygwin|darwin|gnu|usg5-4|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;;
 
   ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the
   ## library search parth, i.e. it won't search /usr/lib for libc and
@@ -3381,8 +3379,7 @@
 if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then
 
   case "$opsys" in
-    ## cygwin: don't link against static libgcc.
-    cygwin|freebsd|netbsd|openbsd) LIB_GCC= ;;
+    freebsd|netbsd|openbsd) LIB_GCC= ;;
 
     gnu-*)
       ## [email-masked] reported that the lgcc_s flag is necessary to