[Top][All Lists]

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

Re: [Tinycc-devel] Grischka last commit breaks some ports

From: Christian Jullien
Subject: Re: [Tinycc-devel] Grischka last commit breaks some ports
Date: Sat, 19 Dec 2020 07:58:14 +0100

__aligned__ or alike, when used, is always for good reasons (machine 
constraints, performances, compatibility...)
So, if not too complex, I vote for __aligned__ support which will improve 
compatibility  with gcc libs.


P.S. After a clean install, win32 mob works again, ignore my previous mail 
about it. Sorry for the noise. I suspect Cygwin does nasty things sometimes 
with permissions event with noacl (unclear why 64bit worked?):

# /etc/fstab
#    This file is read once by the first process in a Cygwin process tree.
#    To pick up changes, restart all Cygwin processes.  For a description
#    see https://cygwin.com/cygwin-ug-net/using.html#mount-table

# This is default anyway:
none /cygdrive cygdrive binary,noacl,posix=0,user 0 0

-----Original Message-----
From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange.fr@nongnu.org] On 
Behalf Of Herman ten Brugge via Tinycc-devel
Sent: Saturday, December 19, 2020 07:25
To: tinycc-devel@nongnu.org
Cc: Herman ten Brugge
Subject: Re: [Tinycc-devel] Grischka last commit breaks some ports

On 12/18/20 2:45 PM, grischka wrote:
> Christian Jullien wrote:
>> On OpenBSD:
> I noticed some tests were excluded but the reasons were say
> not really obvious:
>> Test: 106_pthread...
> From it's name it's testing pthreads. OpenBSD appears to have
> pthreads. So what is the deal?
I added a comment that pthread_condattr_setpshared does not exists.
>> Test: 114_bound_signal...
>> ^^^^  wait forever
I think I mailed the reason before.
The problem is in the libc implementation.
- signals should be disabled during pthread_create
- after a fork libc should init the internal i/o mutex for a client process.

I fixed the pthread_create problem in bcheck.c but this does not work
for bsd because of broken dlsym.
I disabled the fork test on mac. All other libc do this correctly.

There is also another problem.
The dlltest does not work on arm(32 bits) because the jmp_buf has
different size in tcc and gcc due to '__attribute__((__aligned__ (8)))'
See code below.
tcc prints: 388
gcc prints: 392.
If I move the jmpbuf field in the struct TCCState to the end the code works.

Should we implement the aligned attribute in tcc or should we disable
this test on arm32?


#include <stdio.h>

typedef int __jmp_buf[64] __attribute__((__aligned__ (8)));
typedef struct
   unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
} __sigset_t;

struct __jmp_buf_tag
     __jmp_buf __jmpbuf;
     int __mask_was_saved;
     __sigset_t __saved_mask;

    printf ("%d\n", sizeof (struct __jmp_buf_tag));
    return 0;

Tinycc-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]