From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,32bee71a8464bfc2 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!newsfeed1.ip.tiscali.net!tiscali!transit1.news.tiscali.nl!dreader2.news.tiscali.nl!not-for-mail Newsgroups: comp.lang.ada Subject: Re: A bug in gnat/gcc 3.3.3? References: <1104854323.582074.155390@z14g2000cwz.googlegroups.com> <2756551.f73Z0G07VK@linux1.krischik.com> <41db6f28$1_2@news.tm.net.my> <2145623.4z7CBdWjFt@linux1.krischik.com> <877jmro9kt.fsf@insalien.org> <87fz1f1pp4.fsf@deneb.enyo.de> From: Ludovic Brenta Date: Thu, 06 Jan 2005 20:17:53 +0100 Message-ID: <87oeg2mkny.fsf@insalien.org> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:uUK29q5hqxnhGTmJdZkkBUB1EUE= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Tiscali bv NNTP-Posting-Date: 06 Jan 2005 20:17:53 CET NNTP-Posting-Host: 83.134.244.175 X-Trace: 1105039073 dreader2.news.tiscali.nl 44082 83.134.244.175:38456 X-Complaints-To: abuse@tiscali.nl Xref: g2news1.google.com comp.lang.ada:7526 Date: 2005-01-06T20:17:53+01:00 List-Id: Florian Weimer writes: > * Ludovic Brenta: > >>> Yes! 3.4 is currently the best option. 3.15 is old, 3.3 is buggy >>> and 4.0 is still fighting with the tree-saa extentsion. >> >> I differ with this. The quality of GCC 3.4 is similar to, but not >> significantly better than that of GNAT 3.15p. Also, 3.4 is much >> slower and memory-hungry than 3.15p (it may or may not matter to >> you but it's a fact). > > But this comparison is not fair because you are backporting fixes to > GNAT 3.15p. No one is doing this for GNAT in GCC 3.4. 8-) Indeed. Not even Ada Core does maintenance on the Ada front-end in GCC 3.4; all their contributions to GCC go on the main line of development (CVS HEAD); as a result, with every new release of GCC, you get not only bug fixes but also new bugs coming from new and very experimental features. GCC 4.0 has many such new features, both in the Ada front-end and in the back-ends. So, I am not going to say "GCC 4.0 is much better" until I see it :) Note that I also maintain gnat-3.4 in Debian, and I could backport some fixes from HEAD to it. But ASIS and GLADE are roadblocks, and I don't have enough time in the evening to maintain both gnat and gnat-3.4 properly. > Due to the NPTL problem, plain GNAT 3.15p is probably not so useful > for many people with recent GNU/Linux distributions. The patch to fix that problem is publicly available from the Debian archive. It is also small, self-contained, and documented. Heck, just so that nobody has an excuse not to apply it, I'll post it below :) -- Ludovic Brenta. --------------------------------8<------------------------------------------ This patch makes it possible to use the New POSIX Thread Library on Linux >= 2.6 and glibc >= 2.3. It also works on linux 2.4. I backported it from GCC 3.4. I omitted irrelevant parts of this patch to keep it minimal. -- Ludovic Brenta. diff -u -u -r1.5 -r1.6 --- ada/5iosinte.ads 24 Apr 2003 17:53:51 -0000 1.5 +++ ada/5iosinte.ads 1 May 2003 14:14:35 -0000 1.6 @@ -443,11 +448,8 @@ private - type sigset_t is array (0 .. 31) of unsigned_long; + type sigset_t is array (0 .. 127) of unsigned_char; pragma Convention (C, sigset_t); - for sigset_t'Size use 1024; - -- This is for GNU libc version 2 but should be backward compatible with - -- other libc where sigset_t is smaller. type pid_t is new int; @@ -476,7 +478,7 @@ stackaddr : System.Address; stacksize : size_t; end record; - pragma Convention (C_Pass_By_Copy, pthread_attr_t); + pragma Convention (C, pthread_attr_t); type pthread_condattr_t is record dummy : int; @@ -490,25 +492,22 @@ type pthread_t is new unsigned_long; - type struct_pthread_queue is record - head : System.Address; - tail : System.Address; + type struct_pthread_fast_lock is record + status : long; + spinlock : int; end record; - pragma Convention (C, struct_pthread_queue); + pragma Convention (C, struct_pthread_fast_lock); type pthread_mutex_t is record - m_spinlock : int; + m_reserved : int; m_count : int; m_owner : System.Address; m_kind : int; - m_waiting : struct_pthread_queue; + m_lock : struct_pthread_fast_lock; end record; pragma Convention (C, pthread_mutex_t); - type pthread_cond_t is record - c_spinlock : int; - c_waiting : struct_pthread_queue; - end record; + type pthread_cond_t is array (0 .. 47) of unsigned_char; pragma Convention (C, pthread_cond_t); type pthread_key_t is new unsigned;