public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Successfull build of gcc-4.4.0 [trunk revision 145008] on i686-pc-cygwin
@ 2009-03-25 11:32 Rainer Emrich
  2009-03-25 11:42 ` Eric Botcazou
  0 siblings, 1 reply; 7+ messages in thread
From: Rainer Emrich @ 2009-03-25 11:32 UTC (permalink / raw)
  To: gcc

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Compiler version: 4.4.0 20090323 (experimental) [trunk revision 145008] (GCC)
Platform: i686-pc-cygwin
configure flags: --prefix=/opt/devel/gnu/gcc/gcc-4.4.0/i686-pc-cygwin
- --with-gmp=/opt/devel/gnu/gcc/gcc-4.4.0/i686-pc-cygwin
- --with-mpfr=/opt/devel/gnu/gcc/gcc-4.4.0/i686-pc-cygwin --with-gnu-as
- --with-as=/opt/devel/gnu/gcc/gcc-4.4.0/i686-pc-cygwin/bin/as.exe --with-gnu-ld
- --with-ld=/opt/devel/gnu/gcc/gcc-4.4.0/i686-pc-cygwin/bin/ld.exe
- --enable-bootstrap --enable-checking=release --enable-threads=posix
- --enable-languages=c,ada,c++,fortran,java,objc,obj-c++ --enable-libgomp

binutils:
binutils-2.19.51.20090323


Build system:
CYGWIN_NT-5.2-WOW64 kasandra 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin

cc for building:
gcc-4.4.0-20090323
gcc (GCC) 4.4.0 20090323 (experimental) [trunk revision 145008]
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


as for building:
GNU assembler (GNU Binutils) 2.19.51.20090323
Copyright 2008 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of \`i686-pc-cygwin'.

ld for building:
GNU ld (GNU Binutils) 2.19.51.20090323
Copyright 2008 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

testresults:

http://gcc.gnu.org/ml/gcc-testresults/2009-03/msg02525.html


Over all it looks not to bad.

For the acats tests most of the FAIL cases ar of the form:
violation of restriction "NO_IMPLICIT_DYNAMIC_CODE" at system.ads:44

The same is true for the gnat tests.


gcc tests show several ICEs:
gcc.c-torture/compile/20001226-1.c with optimization different than -O0
gcc.c-torture/compile/limits-declparen.c with optimization -O3
gcc.c-torture/compile/limits-exprparen.c
gcc.c-torture/compile/limits-pointer.c -O3 -g -w
gcc.dg/20020425-1.c -ansi -pedantic-errors -S
gcc.dg/pch/largefile.c

Hope that helps to improve further.

Cheers,

Rainer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknKAT0ACgkQoUhjsh59BL5ezACdFdsWTewJyZq3POBT1d4325ca
QgwAni4G7UJi7loTJRSfkUby8x0oJelc
=HJcw
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Successfull build of gcc-4.4.0 [trunk revision 145008] on i686-pc-cygwin
  2009-03-25 11:32 Successfull build of gcc-4.4.0 [trunk revision 145008] on i686-pc-cygwin Rainer Emrich
@ 2009-03-25 11:42 ` Eric Botcazou
  2009-03-25 13:31   ` Rainer Emrich
  2009-03-25 21:08   ` Rainer Emrich
  0 siblings, 2 replies; 7+ messages in thread
From: Eric Botcazou @ 2009-03-25 11:42 UTC (permalink / raw)
  To: Rainer Emrich; +Cc: gcc

> For the acats tests most of the FAIL cases ar of the form:
> violation of restriction "NO_IMPLICIT_DYNAMIC_CODE" at system.ads:44

This very likely means that the compiler is misconfigured.  Try to replace
"cygwin32" with "cygwin" in ada/gcc-interface/Makefile.in and rebuild the 
runtime (make all-target-libada).

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Successfull build of gcc-4.4.0 [trunk revision 145008] on i686-pc-cygwin
  2009-03-25 11:42 ` Eric Botcazou
@ 2009-03-25 13:31   ` Rainer Emrich
  2009-03-25 21:08   ` Rainer Emrich
  1 sibling, 0 replies; 7+ messages in thread
From: Rainer Emrich @ 2009-03-25 13:31 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: gcc

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Eric Botcazou schrieb:
>> For the acats tests most of the FAIL cases ar of the form:
>> violation of restriction "NO_IMPLICIT_DYNAMIC_CODE" at system.ads:44
> 
> This very likely means that the compiler is misconfigured.  Try to replace
> "cygwin32" with "cygwin" in ada/gcc-interface/Makefile.in and rebuild the 
> runtime (make all-target-libada).
> 
Will try that in the evening.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEUEARECAAYFAknKDxkACgkQoUhjsh59BL7i9ACWIOLYIsEL77j/zpGmXNYDrlrH
/wCeKXxB6UlIReKn7qAnjNJmqwPFfgc=
=fbZA
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Successfull build of gcc-4.4.0 [trunk revision 145008] on i686-pc-cygwin
  2009-03-25 11:42 ` Eric Botcazou
  2009-03-25 13:31   ` Rainer Emrich
@ 2009-03-25 21:08   ` Rainer Emrich
  2009-03-25 22:44     ` Dave Korn
  1 sibling, 1 reply; 7+ messages in thread
From: Rainer Emrich @ 2009-03-25 21:08 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: gcc

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Eric Botcazou schrieb:
>> For the acats tests most of the FAIL cases ar of the form:
>> violation of restriction "NO_IMPLICIT_DYNAMIC_CODE" at system.ads:44
> 
> This very likely means that the compiler is misconfigured.  Try to replace
> "cygwin32" with "cygwin" in ada/gcc-interface/Makefile.in and rebuild the 
> runtime (make all-target-libada).
> 
that gives an bootstrap failure:
g-socthi.adb:534:15: "WSASYSNOTREADY" is undefined
g-socthi.adb:535:15: "WSAVERNOTSUPPORTED" is undefined
g-socthi.adb:537:15: "WSANOTINITIALISED" is undefined
g-socthi.adb:539:15: "WSAEDISCON" is undefined
g-socthi.adb:546:15: duplication of choice value at line 494
make[6]: *** [g-socthi.o] Error 1
make[6]: Leaving directory
`/home/rainer/software/build/i686-pc-cygwin/gcc/gcc/ada/rts'
make[5]: *** [gnatlib] Error 2
make[5]: Leaving directory `/home/rainer/software/build/i686-pc-cygwin/gcc/gcc/ada'
make[4]: *** [gnatlib-shared-win32] Error 2
make[4]: Leaving directory `/home/rainer/software/build/i686-pc-cygwin/gcc/gcc/ada'
make[3]: *** [gnatlib-shared] Error 2
make[3]: Leaving directory `/home/rainer/software/build/i686-pc-cygwin/gcc/gcc/ada'
make[2]: *** [gnatlib-shared] Error 2
make[2]: Leaving directory
`/home/rainer/software/build/i686-pc-cygwin/gcc/i686-pc-cygwin/libada'
make[1]: *** [all-target-libada] Error 2

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknKWvYACgkQoUhjsh59BL5EZQCghGptRJ15WCtztI0W0gcFI7Bt
bscAoKQlzGtlnTAHtK1GWF9mtsWGv1oA
=PF7B
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Successfull build of gcc-4.4.0 [trunk revision 145008] on i686-pc-cygwin
  2009-03-25 21:08   ` Rainer Emrich
@ 2009-03-25 22:44     ` Dave Korn
  2009-03-26  2:36       ` Eric Botcazou
  0 siblings, 1 reply; 7+ messages in thread
From: Dave Korn @ 2009-03-25 22:44 UTC (permalink / raw)
  To: Rainer Emrich; +Cc: Eric Botcazou, gcc

[-- Attachment #1: Type: text/plain, Size: 765 bytes --]

Rainer Emrich wrote:
> Eric Botcazou schrieb:
>>> For the acats tests most of the FAIL cases ar of the form:
>>> violation of restriction "NO_IMPLICIT_DYNAMIC_CODE" at system.ads:44
>> This very likely means that the compiler is misconfigured.  Try to replace
>> "cygwin32" with "cygwin" in ada/gcc-interface/Makefile.in and rebuild the 
>> runtime (make all-target-libada).
>>
> that gives an bootstrap failure:
> g-socthi.adb:534:15: "WSASYSNOTREADY" is undefined


  I have these patches against 4.3.2/4.3.3 that should help with this.  (Sorry
Eric, I've been too busy with the cygwin gcc distro releases to start feeding
these upstream yet, but they need to wait for 4.5 anyway.  They're not all in
entirely suitable shape yet either.)

    cheers,
      DaveK

[-- Attachment #2: ada.patch --]
[-- Type: text/x-patch, Size: 13371 bytes --]

--- origsrc/gcc-4.3.3/gcc/ada/Makefile.in	2008-02-13 19:04:53.000000000 +0000
+++ src/gcc-4.3.3/gcc/ada/Makefile.in	2009-03-06 07:14:26.562500000 +0000
@@ -198,6 +198,10 @@
 # Type of tools build we are doing; default is not compiling tools.
 TOOLSCASE =
 
+# Which install goal to use.
+INSTALL_GNATLIB_MAIN  = install-gnatlib
+INSTALL_GNATLIB_WIN32 = unused-install-gnatlib
+
 # End of variables for you to override.
 
 all: all.indirect
@@ -273,7 +277,7 @@
 	$(CC) -c -x assembler $< $(OUTPUT_OPTION)
 
 .c.o:
-	$(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \
+	$(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \
 	  $(OUTPUT_OPTION)
 
 .adb.o:
@@ -1298,7 +1302,7 @@
   LIBRARY_VERSION := $(subst .,_,$(LIB_VERSION))
 endif
 
-ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
+ifeq ($(strip $(filter-out cygwin% mingw% pe,$(osys))),)
   LIBGNAT_TARGET_PAIRS = \
   a-dirval.adb<a-dirval-mingw.adb \
   a-excpol.adb<a-excpol-abort.adb \
@@ -1311,8 +1315,6 @@
   s-tasinf.adb<s-tasinf-mingw.adb \
   s-tasinf.ads<s-tasinf-mingw.ads \
   g-bytswa.adb<g-bytswa-x86.adb \
-  g-socthi.ads<g-socthi-mingw.ads \
-  g-socthi.adb<g-socthi-mingw.adb \
   g-stsifd.adb<g-stsifd-sockets.adb \
   g-soccon.ads<g-soccon-mingw.ads \
   g-soliop.ads<g-soliop-mingw.ads
@@ -1342,7 +1344,24 @@
     EXTRA_GNATRTL_NONTASKING_OBJS = g-regist.o
     EXTRA_GNATRTL_TASKING_OBJS=a-exetim.o
 
-    MISCLIB = -lwsock32
+    # Which install goal to use.
+    INSTALL_GNATLIB_MAIN  = unused-install-gnatlib
+    INSTALL_GNATLIB_WIN32 = install-gnatlib
+
+    # Mingw uses winsock-based sockets; cygwin uses POSIX sockets.
+    #ifneq ($(strip $(filter-out cygwin%,$(osys))),)
+    # However it doesn't seem to work too well, so use winsock for both.
+      LIBGNAT_TARGET_PAIRS += \
+      g-socthi.ads<g-socthi-mingw.ads \
+      g-socthi.adb<g-socthi-mingw.adb
+      MISCLIB = -lwsock32
+    #endif
+
+    # Set shared lib prefix (lib for mingw, cyg for cygwin)
+    WIN32_SHARED_LIB_PREFIX=lib
+    ifneq ($(strip $(filter cygwin%,$(osys))),)
+      WIN32_SHARED_LIB_PREFIX=cyg
+    endif
 
     # ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT
     # auto-import support for array/record will be done.
@@ -1354,6 +1373,7 @@
   indepsw.adb<indepsw-mingw.adb
 
   EH_MECHANISM=-gcc
+  T_ADA_CFLAGS=-fexceptions
   GMEM_LIB = gmemlib
   PREFIX_OBJS = $(PREFIX_REAL_OBJS)
   EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
@@ -1798,7 +1818,7 @@
 	  true; \
 	fi
 
-install-gnatlib: ../stamp-gnatlib
+$(INSTALL_GNATLIB_MAIN): ../stamp-gnatlib
 #	Create the directory before deleting it, in case the directory is
 #	a list of directories (as it may be on VMS). This ensures we are
 #	deleting the right one.
@@ -1840,6 +1860,48 @@
 	cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
 	cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
 
+$(INSTALL_GNATLIB_WIN32): ../stamp-gnatlib
+#	Create the directory before deleting it, in case the directory is
+#	a list of directories (as it may be on VMS). This ensures we are
+#	deleting the right one.  This is the win32 version.
+	-$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
+	-$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
+	$(RMDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
+	$(RMDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
+	-$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
+	-$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
+	for file in rts/*.ali; do \
+	    $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
+	done
+	-$(INSTALL_DATA) rts/g-trasym$(objext) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
+	-cd rts; for file in *$(arext);do \
+	    $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
+	    $(RANLIB_FOR_TARGET) $(DESTDIR)$(ADA_RTL_OBJ_DIR)/$$file; \
+	done
+	-$(foreach file, $(EXTRA_ADALIB_FILES), \
+	    $(INSTALL_DATA_DATE) rts/$(file) $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \
+	) true
+#     Install the shared libraries, if any, using $(INSTALL) instead
+#     of $(INSTALL_DATA). The latter may force a mode inappropriate
+#     for shared libraries on some targets, e.g. on HP-UX where the x
+#     permission is required.  We are win32 here.
+	for file in gnat gnarl; do \
+	   if [ -f rts/$(WIN32_SHARED_LIB_PREFIX)$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
+	      $(INSTALL) rts/$(WIN32_SHARED_LIB_PREFIX)$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
+			 $(DESTDIR)$(bindir); \
+	   fi; \
+	   if [ -f rts/$(WIN32_SHARED_LIB_PREFIX)$${file}$(soext) ]; then \
+	      $(LN_S) $(WIN32_SHARED_LIB_PREFIX)$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
+	      $(DESTDIR)$(bindir)/lib$${file}$(soext); \
+	   fi; \
+	done
+# This copy must be done preserving the date on the original file.
+	for file in rts/*.ad?; do \
+	    $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR); \
+	done
+	cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
+	cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
+
 ../stamp-gnatlib2:
 	$(RM) rts/s-*.ali
 	$(RM) rts/s-*$(objext)
@@ -1996,14 +2058,18 @@
              gnatlib
 	$(RM) rts/libgna*$(soext)
 	cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
-		-o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
+		-o $(WIN32_SHARED_LIB_PREFIX)gnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
+		-Wl,--out-implib,libgnat$(soext)$(arext) \
 		$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
-		$(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
+		$(SO_OPTS)$(WIN32_SHARED_LIB_PREFIX)gnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB) \
+		-Wl,--enable-auto-import
 	cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
-		-o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
+		-o $(WIN32_SHARED_LIB_PREFIX)gnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
+		-Wl,--out-implib,libgnarl$(soext)$(arext) \
 		$(GNATRTL_TASKING_OBJS) \
-		$(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
-		$(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
+		$(SO_OPTS)$(WIN32_SHARED_LIB_PREFIX)gnarl$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB) \
+		-L. $(THREADSLIB) -Wl,libgnat$(soext)$(arext) \
+		-Wl,--enable-auto-import
 
 gnatlib-shared-darwin:
 	$(MAKE) $(FLAGS_TO_PASS) \
@@ -2187,37 +2253,37 @@
 vx_stack_info.o : vx_stack_info.c
 
 gen-soccon: gen-soccon.c gsocket.h
-	$(CC) $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+	$(CC) $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
 		-UIN_GCC -DTARGET=\"$(target_alias)\" \
 		$< $(OUTPUT_OPTION)
 
 cio.o     : cio.c
-	$(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
+	$(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) \
 	         $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
 
 init.o    : init.c adaint.h raise.h
-	$(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
+	$(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) \
 	         $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
 
 initialize.o : initialize.c raise.h
-	$(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
+	$(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) \
 	         $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
 
 targext.o : targext.c
-	$(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
+	$(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) \
 		$(ALL_CPPFLAGS) $(INCLUDES_FOR_SUBDIR) \
 		$< $(OUTPUT_OPTION)
 
 # No optimization to compile this file as optimizations (-O1 or above) breaks
 # the SEH handling on Windows. The reasons are not clear.
 seh_init.o : seh_init.c raise.h
-	$(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) -O0 \
+	$(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) -O0 \
 	         $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
 
 # Need to keep the frame pointer in this file to pop the stack properly on
 # some targets.
 tracebak.o  : tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c
-	$(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+	$(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
 	      -fno-omit-frame-pointer $< $(OUTPUT_OPTION)
 
 # In GNU Make, ignore whether `stage*' exists.
--- origsrc/gcc-4.3.3/gcc/ada/gsocket.h	2008-02-13 19:04:53.000000000 +0000
+++ src/gcc-4.3.3/gcc/ada/gsocket.h	2009-03-06 07:14:26.578125000 +0000
@@ -173,7 +173,7 @@
  * VxWorks and VMS).
  */
 
-#if defined (_AIX) || defined (__FreeBSD__) || defined (__hpux__) || defined (__osf__) || defined (_WIN32) || defined (__APPLE__)
+#if defined (_AIX) || defined (__FreeBSD__) || defined (__hpux__) || defined (__osf__) || defined (__CYGWIN__) || defined (_WIN32) || defined (__APPLE__)
 # define HAVE_THREAD_SAFE_GETxxxBYyyy 1
 #elif defined (sgi) || defined (linux) || (defined (sun) && defined (__SVR4) && !defined (__vxworks))
 # define HAVE_GETxxxBYyyy_R 1
--- origsrc/gcc-4.3.3/gcc/ada/initialize.c	2008-01-03 09:35:04.000000000 +0000
+++ src/gcc-4.3.3/gcc/ada/initialize.c	2009-03-06 07:14:26.578125000 +0000
@@ -192,6 +192,40 @@
   __main ();
 }
 
+#elif defined (__CYGWIN__)
+
+/* We must call __main to run the static ctors, or DW2 EH, amongst
+   other things, will fail.  */
+
+/***************************************/
+/* __gnat_initialize (Cygwin Version) */
+/***************************************/
+
+extern void __main (void);
+
+void
+__gnat_initialize (void *eh ATTRIBUTE_UNUSED)
+{
+  __main ();
+
+   /* Initialize floating-point coprocessor. This call is needed because
+      the MS libraries default to 64-bit precision instead of 80-bit
+      precision, and we require the full precision for proper operation,
+      given that we have set Max_Digits etc with this in mind */
+   __gnat_init_float ();
+
+   /* Note that we do not activate this for the compiler itself to avoid a
+      bootstrap path problem.  Older version of gnatbind will generate a call
+      to __gnat_initialize() without argument. Therefore we cannot use eh in
+      this case.  It will be possible to remove the following #ifdef at some
+      point.  */
+#ifdef IN_RTS
+   /* Install the Structured Exception handler.  */
+   if (eh)
+     __gnat_install_SEH_handler (eh);
+#endif
+}
+
 #else
 
 /* For all other versions of GNAT, the initialize routine and handler
--- origsrc/gcc-4.3.3/gcc/ada/sysdep.c	2008-01-03 09:35:04.000000000 +0000
+++ src/gcc-4.3.3/gcc/ada/sysdep.c	2009-03-06 07:14:26.578125000 +0000
@@ -397,7 +397,7 @@
 {
 #if defined (linux) || defined (sun) || defined (sgi) || defined (__EMX__) \
     || (defined (__osf__) && ! defined (__alpha_vxworks)) \
-    || defined (__CYGWIN32__) || defined (__MACHTEN__) || defined (__hpux__) \
+    || defined (__CYGWIN__) || defined (__MACHTEN__) || defined (__hpux__) \
     || defined (_AIX) || (defined (__svr4__) && defined (i386)) \
     || defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__)
   char c;
@@ -684,6 +684,40 @@
 }
 
 #endif /* WINNT */
+
+#ifdef __CYGWIN__
+
+size_t _msize(void *memblock)
+{
+  return (size_t) malloc_usable_size (memblock);
+}
+
+#include <windows.h>
+
+int
+__gnat_is_windows_xp (void)
+{
+  static int is_win_xp=0, is_win_xp_checked=0;
+
+  if (!is_win_xp_checked)
+    {
+      OSVERSIONINFO version;
+
+      is_win_xp_checked = 1;
+
+      memset (&version, 0, sizeof (version));
+      version.dwOSVersionInfoSize = sizeof (version);
+
+      is_win_xp = GetVersionEx (&version)
+        && version.dwPlatformId == VER_PLATFORM_WIN32_NT
+        && (version.dwMajorVersion > 5
+            || (version.dwMajorVersion == 5 && version.dwMinorVersion >= 1));
+    }
+  return is_win_xp;
+}
+
+#endif /* __CYGWIN__ */
+
 #ifdef VMS
 
 /* This gets around a problem with using the old threads library on VMS 7.0. */
--- origsrc/gcc-4.3.3/gcc/ada/system-mingw.ads	2007-12-19 16:22:26.000000000 +0000
+++ src/gcc-4.3.3/gcc/ada/system-mingw.ads	2009-03-06 07:14:26.593750000 +0000
@@ -141,7 +141,7 @@
    Always_Compatible_Rep     : constant Boolean := True;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   ZCX_By_Default            : constant Boolean := False;
+   ZCX_By_Default            : constant Boolean := True;
    GCC_ZCX_Support           : constant Boolean := True;
 
    ---------------------------
--- origsrc/gcc-4.3.3/gcc/testsuite/ada/acats/run_all.sh	2006-09-14 11:12:03.000000000 +0100
+++ src/gcc-4.3.3/gcc/testsuite/ada/acats/run_all.sh	2009-03-06 07:14:26.687500000 +0000
@@ -13,7 +13,7 @@
 gnatflags="-gnatws"
 
 target_run () {
-$*
+	$testdir/run_test.exp $1 > $2 2>&1
 }
 
 # End of customization section.
@@ -99,7 +99,7 @@
 
 # Find out the size in bit of an address on the target
 target_gnatmake $testdir/support/impbit.adb >> $dir/acats.log 2>&1
-target_run $dir/support/impbit > $dir/support/impbit.out 2>&1
+target_run $dir/support/impbit $dir/support/impbit.out
 target_bit=`cat $dir/support/impbit.out`
 echo target_bit="$target_bit" >> $dir/acats.log
 
@@ -276,7 +276,7 @@
       if [ ! -x $dir/tests/$chapter/$i/$binmain ]; then
          sync
       fi
-      target_run $dir/tests/$chapter/$i/$binmain > $dir/tests/$chapter/$i/${i}.log 2>&1
+      target_run $dir/tests/$chapter/$i/$binmain $dir/tests/$chapter/$i/${i}.log
       cd $dir/tests/$chapter/$i
       cat ${i}.log >> $dir/acats.log
       egrep -e '(==== |\+\+\+\+ |\!\!\!\! )' ${i}.log > /dev/null 2>&1
--- origsrc/gcc-4.3.3/gcc/testsuite/ada/acats/run_test.exp	1970-01-01 00:00:00.000000000 +0000
+++ src/gcc-4.3.3/gcc/testsuite/ada/acats/run_test.exp	2009-03-06 07:14:26.687500000 +0000
@@ -0,0 +1,10 @@
+#!/usr/bin/expect -f
+
+set timeout 300
+
+spawn -noecho $argv
+expect timeout {
+       send_user "Program timed out.\n"
+       exit 1
+}
+

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Successfull build of gcc-4.4.0 [trunk revision 145008] on i686-pc-cygwin
  2009-03-25 22:44     ` Dave Korn
@ 2009-03-26  2:36       ` Eric Botcazou
  2009-03-26 22:20         ` Dave Korn
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Botcazou @ 2009-03-26  2:36 UTC (permalink / raw)
  To: Dave Korn; +Cc: Rainer Emrich, gcc

>   I have these patches against 4.3.2/4.3.3 that should help with this. 
> (Sorry Eric, I've been too busy with the cygwin gcc distro releases to
> start feeding these upstream yet, but they need to wait for 4.5 anyway. 
> They're not all in entirely suitable shape yet either.)

Thanks for stepping in.  I thought GNAT could at least be built on cygwin, but 
apparently it cannot anymore.  I think that we should try to make it build 
again for 4.4 by merging just enough of your changes.

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Successfull build of gcc-4.4.0 [trunk revision 145008] on i686-pc-cygwin
  2009-03-26  2:36       ` Eric Botcazou
@ 2009-03-26 22:20         ` Dave Korn
  0 siblings, 0 replies; 7+ messages in thread
From: Dave Korn @ 2009-03-26 22:20 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: Dave Korn, Rainer Emrich, gcc

Eric Botcazou wrote:
>>   I have these patches against 4.3.2/4.3.3 that should help with this. 
>> (Sorry Eric, I've been too busy with the cygwin gcc distro releases to
>> start feeding these upstream yet, but they need to wait for 4.5 anyway. 
>> They're not all in entirely suitable shape yet either.)
> 
> Thanks for stepping in.  I thought GNAT could at least be built on cygwin, but 
> apparently it cannot anymore.  I think that we should try to make it build 
> again for 4.4 by merging just enough of your changes.
> 

  Of the stuff in the previous email, I would reckon that the necessary parts
are probably:

-ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
+ifeq ($(strip $(filter-out cygwin% mingw% pe,$(osys))),)

.. that change to ensure the windows-specific target-pair overrides, and the
gsocket.h patch.  The sysdep.c changes might also turn out to be required to
prevent the build failing at a slightly later stage.

  Most of the other changes are not suitable for 4.4.  (The
ADA_CFLAGS->ALL_ADA_CFLAGS and T_ADA_CFLAGS changes are probably entirely
superfluous, they were parts of earlier attempts to resolve EH issues which I
believe were in fact fixed in their entirety when I figured out to change
ZCX_By_Default, but I haven't had time to re-test with them removed yet.)

    cheers,
      DaveK

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-03-26 17:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-25 11:32 Successfull build of gcc-4.4.0 [trunk revision 145008] on i686-pc-cygwin Rainer Emrich
2009-03-25 11:42 ` Eric Botcazou
2009-03-25 13:31   ` Rainer Emrich
2009-03-25 21:08   ` Rainer Emrich
2009-03-25 22:44     ` Dave Korn
2009-03-26  2:36       ` Eric Botcazou
2009-03-26 22:20         ` Dave Korn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).