[PATCH v16 5/8] nptl: Introduce <rseq-access.h> for RSEQ_* accessors
Michael Jeanson
mjeanson@efficios.com
Mon Jan 13 19:11:52 GMT 2025
On 2025-01-13 05:49, Frank Scheiner wrote:
> The changes in 494d651 ([1]) break our ia64 toolchain builds as it
> looks like ia64 is one of (or) the (only) arch(es) w/o
> __builtin_thread_pointer() in the GCC:
>
> ```
> In function '__thread_pointer',
> inlined from 'RSEQ_SELF' at ../sysdeps/unix/sysv/linux/rseq-internal.h:93:41,
> inlined from '__pthread_create_2_1' at pthread_create.c:699:13:
> ../sysdeps/generic/thread_pointer.h:25:10: error: '__builtin_thread_pointer' is not supported on this target
> 25 | return __builtin_thread_pointer ();
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> ```
>
> [1]: https://sourceware.org/git/?p=glibc.git;a=commit;h=494d65129ed5ae1154b75cc189bbdde5e9ecf1df
Do you maintain a private ia64 port in a separate branch/repo?
>
> This seems to indeed "fix" the ia64 build for me, I just don't really know if
> it is fully correct to use __thread_self like that:
>
> ```
> register struct pthread *__thread_self __asm__("r13");
> > static inline void *
> __thread_pointer (void)
> {
> return __thread_self;
> }
> ```
>
> But I guess a pointer is a pointer and the compiler seems to be happy,
> too.
Your patch should work as-is, some compilers might warn on the implicit
cast to 'void *' but you can just add the explicit cast in __thread_pointer().
Thanks,
Michael
More information about the Libc-alpha
mailing list