From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4211 invoked by alias); 24 Apr 2003 07:12:16 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 4204 invoked from network); 24 Apr 2003 07:12:15 -0000 Received: from unknown (HELO mwinf0401.wanadoo.fr) (193.252.22.27) by sources.redhat.com with SMTP; 24 Apr 2003 07:12:15 -0000 Received: from ATuileries-101-1-5-241.abo.wanadoo.fr (ATuileries-101-1-5-241.abo.wanadoo.fr [193.253.192.241]) by mwinf0401.wanadoo.fr (SMTP Server) with ESMTP id E125B58000FC for ; Thu, 24 Apr 2003 09:12:14 +0200 (CEST) Subject: Ada and NTPL From: Laurent Guerby To: gcc@gcc.gnu.org Content-Type: text/plain Organization: Message-Id: <1051168338.26580.42.camel@localhost.localdomain> Mime-Version: 1.0 Date: Thu, 24 Apr 2003 11:24:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2003-04/txt/msg01219.txt.bz2 I did succeed at get tasking working on Red Hat 9 x86 and NTPL using the ACT tree (HEAD + gcc-head as of 23Apr2003 around 20:00 GMT) and GCC mainline. The resulting compiler gets much better results than 3.2 and results in line with the ACT 5.00 release except for a miscompilation of a-calend.adb that gives 17 failures. For the record here is a reduced test case: with Ada.Calendar; procedure P1 is Some_Time : Ada.Calendar.Time; begin Some_Time := Ada.Calendar.Time_Of (Month => 9, Day => 16, Year => 1993); end P1; $ gnatmake p1 $ ./p1 raised CONSTRAINT_ERROR : a-calend.adb:418 explicit raise $ The code failing in Ada.Calendar is: if not Year 'Valid or else not Month 'Valid or else not Day 'Valid or else not Seconds'Valid then raise Constraint_Error; end if; I did check the assembly. The build process is as follows: 1/ replace gcc/ada in GCC by the sources from the ACT tree 2/ copy -f all files from the gcc-head ACT source tree into gcc/ada 3/ apply the following patch Index: Make-lang.in =================================================================== RCS file: /anoncvs/gnat/Make-lang.in,v retrieving revision 1.131.2.10 diff -u -r1.131.2.10 Make-lang.in --- Make-lang.in 21 Apr 2003 12:24:45 -0000 1.131.2.10 +++ Make-lang.in 23 Apr 2003 18:29:21 -0000 @@ -328,12 +328,12 @@ ADA_INCLUDES="-I- -Iada/ -I$(srcdir)/ada"\ CC="stage2/xgcc -Bstage2" STAGE_PREFIX=stage2/ gnattools1 $(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools2 - $(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools3 +# $(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools3 regnattools: $(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools1-re $(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools2 - $(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools3 +# $(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools3 # use host-gcc host-gnatmake host-gnatbind host-gnatlink # put the host RTS dir first in the PATH to hide the default runtime Index: Makefile.in =================================================================== RCS file: /anoncvs/gnat/Makefile.in,v retrieving revision 1.1679.2.8 diff -u -r1.1679.2.8 Makefile.in --- Makefile.in 28 Mar 2003 10:13:17 -0000 1.1679.2.8 +++ Makefile.in 23 Apr 2003 18:29:25 -0000 @@ -1283,7 +1283,7 @@ include $(fsrcdir)/Makefile.rtl -GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) g-trasym.o +GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) g-trasym.o memtrack.o # Files which are suitable in no run time/hi integrity mode Index: 5iosinte.ads =================================================================== RCS file: /anoncvs/gnat/5iosinte.ads,v retrieving revision 1.31 diff -u -r1.31 5iosinte.ads --- 5iosinte.ads 31 Oct 2002 15:44:58 -0000 1.31 +++ 5iosinte.ads 24 Apr 2003 06:58:55 -0000 @@ -507,9 +507,13 @@ end record; pragma Convention (C, pthread_mutex_t); + type pthread_cond_padding_t is array (0 .. 35) of unsigned_char; + pragma Convention (C, pthread_cond_padding_t); + type pthread_cond_t is record c_lock : struct_pthread_fast_lock; c_waiting : System.Address; + c_padding : pthread_cond_padding_t; end record; pragma Convention (C, pthread_cond_t); Then it should bootstrap without problem and run quite well on http://perso.wanadoo.fr/guerby/ftp/acats4gnat-0.7.tgz using "gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)" as base compiler for C & Ada. -- Laurent Guerby