comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic.brenta@insalien.org>
Subject: Re: A bug in gnat/gcc 3.3.3?
Date: Thu, 06 Jan 2005 20:17:53 +0100
Date: 2005-01-06T20:17:53+01:00	[thread overview]
Message-ID: <87oeg2mkny.fsf@insalien.org> (raw)
In-Reply-To: 87fz1f1pp4.fsf@deneb.enyo.de

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;



  parent reply	other threads:[~2005-01-06 19:17 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-04 15:58 A bug in gnat/gcc 3.3.3? Adrian Hoe
2005-01-04 16:13 ` Duncan Sands
2005-01-04 16:32   ` Adrian Hoe
2005-01-06 15:01     ` Martin Krischik
2005-01-04 18:01 ` Martin Krischik
2005-01-05  4:45   ` Adrian Hoe
2005-01-05  4:59     ` Bobby D. Bryant
2005-01-31  4:45       ` Adrian Hoe
2005-01-05  8:44     ` Martin Krischik
2005-01-05 21:22       ` Ludovic Brenta
2005-01-05 21:47         ` Duncan Sands
2005-01-05 22:22         ` Florian Weimer
2005-01-06  0:54           ` Adrian Hoe
2005-01-06 10:26             ` Martin Krischik
2005-01-06 19:07             ` Ludovic Brenta
2005-01-06 19:17           ` Ludovic Brenta [this message]
2005-01-06  1:54         ` Bobby D. Bryant
2005-01-06 10:28         ` Martin Krischik
2005-01-06 20:22           ` Ludovic Brenta
2005-01-06 21:29             ` Jerome Hugues
2005-01-06 23:04               ` Ludovic Brenta
2005-01-07  8:40                 ` Jerome Hugues
2005-01-07 16:15             ` Martin Krischik
2005-01-05 12:20     ` Pascal Obry
2005-01-05 21:21       ` Ludovic Brenta
2005-01-04 19:16 ` Ludovic Brenta
2005-01-05  4:25   ` Adrian Hoe
2005-01-05 21:19     ` Ludovic Brenta
2005-01-07 16:22 ` Adrian Hoe
2005-01-07 18:13   ` Ludovic Brenta
2005-01-07 23:32   ` Ludovic Brenta
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox