|
From: | Christian Jullien |
Subject: | Re: [Tinycc-devel] Fwd: [PATCH] freebsd support update proposal |
Date: | Wed, 9 Feb 2022 06:45:59 +0100 |
Hi Herman, As just tested, your recent patch fixes the __Thread_local issue we have otherwise with <ctype.h> I think, the two following patches proposed by David are also needed, wdyt? diff --git a/include/tccdefs.h b/include/tccdefs.h index 2d42bea..1bef382 100644 --- a/include/tccdefs.h +++ b/include/tccdefs.h @@ -91,6 +91,11 @@ # if __SIZEOF_POINTER__ == 8 /* FIXME, __int128_t is used by setjump */ #define __int128_t struct { unsigned char _dummy[16] __attribute((aligned(16))); } + #define __SIZEOF_SIZE_T__ 8 + #define __SIZEOF_PTRDIFF_T__ 8 +#else + #define __SIZEOF_SIZE_T__ 4 + #define __SIZEOF_PTRDIFF_T__ 4 # endif #elif defined __FreeBSD_kernel__ diff --git a/lib/bcheck.c b/lib/bcheck.c index 0379b6e..3f66b1c 100644 --- a/lib/bcheck.c +++ b/lib/bcheck.c @@ -226,10 +226,13 @@ typedef struct alloca_list_struct { #elif defined(__OpenBSD__) #define BOUND_TID_TYPE pid_t #define BOUND_GET_TID syscall (SYS_getthrid) -#elif defined(__FreeBSD__) || defined(__NetBSD__) +#elif defined(__FreeBSD__) #define BOUND_TID_TYPE pid_t -#define BOUND_GET_TID 0 -#elif defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(__riscv) +#define BOUND_GET_TID syscall (SYS_thr_self) +#elif defined(__NetBSD__) +#define BOUND_TID_TYPE pid_t +#define BOUND_GET_TID syscall (SYS_lwp_self) +#elif defined(__linux__) #define BOUND_TID_TYPE pid_t #define BOUND_GET_TID syscall (SYS_gettid) #else From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange.fr@nongnu.org] On Behalf Of Herman ten Brugge via Tinycc-devel On 2/7/22 10:54, grischka wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |