[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [alpha, hppa] GCC-4.3 as the default compilers for lenny?



Bastian Blank a écrit :
> On Sat, Mar 22, 2008 at 10:02:22PM +0100, Matthias Klose wrote:
>> amd64 and i386 side note: the gcc-4.3 4.3.0-2 upload has a patch
>> reenabling the cld instruction when stringops are used; this patch is
>> neither in the gcc-4_3-branch or in the trunk.
> 
> I discussed with doko a bit and have to propose another solution. This
> solution have a prequisite: gcc must not generate string ops without
> function calls.

This prequisite is not always true. Starting with GCC 4.3, some uses of
bzero/memset/memmove are generating stringops directly and not call
functions. It depends on the size of the array, and if it is known at
compilation time.

This is for example the case of sigemptyset() in the glibc.

> To understand this solution you have to understand async signal safety
> of functions. A signal handler must not call any unsafe function. On a
> Debian system this list is in signal(7). All the functions are in the
> libc and the libaio.
> 
> The following proposal uses this and should fix any program which does
> not use unsafe functions in their signal handlers:
> - Add the cld patch to gcc-4.3, the option is disabled by default.
> - Build glibc (and maybe libaio) with -mcld.
> 
> Alternative:
> - Patch an explicit cld to the beginning of each of the safe functions
>   in glibc and libaio.
> 
> Bastian
> 


-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net


Reply to: