Re: __builtin_thread_pointer

2025-02-13 Thread Ken Brown via Cygwin
On 2/12/2025 12:42 PM, ASSI via Cygwin wrote: Ken Brown via Cygwin writes: On 2/11/2025 4:03 PM, Corinna Vinschen via Cygwin wrote: Ken, check the source or configury of your package. It looks weird that this function should be called architecture-independently. Thanks for the suggestion. It

Re: __builtin_thread_pointer

2025-02-12 Thread Corinna Vinschen via Cygwin
On Feb 11 23:52, Dimitry Andric via Cygwin wrote: > Yes, that is the RISCV or SH specific method. On x86_64, you access it via > the fs register, i.e. gcc (on Linux at least :) compiles: > > void *p = __builtin_thread_pointer(); > > to something like: > >

Re: __builtin_thread_pointer

2025-02-12 Thread ASSI via Cygwin
Ken Brown via Cygwin writes: > On 2/11/2025 4:03 PM, Corinna Vinschen via Cygwin wrote: >> Ken, check the source or configury of your package. It looks weird that >> this function should be called architecture-independently. > Thanks for the suggestion. It's actually not called > architecture-ind

Re: __builtin_thread_pointer

2025-02-12 Thread Brian Inglis via Cygwin
via Cygwin wrote: Does Cygwin support __builtin_thread_pointer? I'm guessing not, because I'm getting a link error (undefined reference to `__builtin_thread_pointer') when I try to build some software that uses it. Or is there something that would have to be added to the link com

Re: __builtin_thread_pointer

2025-02-12 Thread Corinna Vinschen via Cygwin
On Feb 11 16:45, Ken Brown via Cygwin wrote: > On 2/11/2025 4:03 PM, Corinna Vinschen via Cygwin wrote: > > Ken, check the source or configury of your package. It looks weird that > > this function should be called architecture-independently. > Thanks for the suggestion. It's actually not called

Re: __builtin_thread_pointer

2025-02-11 Thread Brian Inglis via Cygwin
On 2025-02-11 13:58, Dimitry Andric wrote: On 11 Feb 2025, at 21:45, Brian Inglis via Cygwin wrote: On 2025-02-11 12:41, Dimitry Andric via Cygwin wrote: On 11 Feb 2025, at 20:26, Ken Brown via Cygwin wrote: Does Cygwin support __builtin_thread_pointer? I'm guessing not, because I'm

Re: __builtin_thread_pointer

2025-02-11 Thread Dimitry Andric via Cygwin
own via Cygwin wrote: >>>>> Does Cygwin support __builtin_thread_pointer? I'm guessing not, because >>>>> I'm getting a link error (undefined reference to >>>>> `__builtin_thread_pointer') when I try to build some software that uses >>>

Re: __builtin_thread_pointer

2025-02-11 Thread Brian Inglis via Cygwin
On 2025-02-11 13:58, Dimitry Andric wrote: On 11 Feb 2025, at 21:45, Brian Inglis via Cygwin wrote: On 2025-02-11 12:41, Dimitry Andric via Cygwin wrote: On 11 Feb 2025, at 20:26, Ken Brown via Cygwin wrote: Does Cygwin support __builtin_thread_pointer? I'm guessing not, because I'm

Re: __builtin_thread_pointer

2025-02-11 Thread Ken Brown via Cygwin
On 2/11/2025 4:03 PM, Corinna Vinschen via Cygwin wrote: Ken, check the source or configury of your package. It looks weird that this function should be called architecture-independently. Thanks for the suggestion. It's actually not called architecture-independently, but the code was convolute

Re: __builtin_thread_pointer

2025-02-11 Thread Corinna Vinschen via Cygwin
On Feb 11 20:41, Dimitry Andric via Cygwin wrote: > It's a gcc builtin function, not something implemented in an external > library. Therefore, there is no linker option that can fix this. > > Also, as far as I can see from gcc's documentation, > __builtin_thread_pointe

Re: __builtin_thread_pointer

2025-02-11 Thread Dimitry Andric via Cygwin
oid f(void) { void *p = __builtin_thread_pointer(); } $ gcc -c test-builtin-thread-pointer.c test-builtin-thread-pointer.c: In function ‘f’: test-builtin-thread-pointer.c:3:13: warning: implicit declaration of function ‘__builtin_thread_pointer’; did you mean ‘__builtin_extend_pointer’? [-Wimplici

Re: __builtin_thread_pointer

2025-02-11 Thread Brian Inglis via Cygwin
On 2025-02-11 12:41, Dimitry Andric via Cygwin wrote: On 11 Feb 2025, at 20:26, Ken Brown via Cygwin wrote: Does Cygwin support __builtin_thread_pointer? I'm guessing not, because I'm getting a link error (undefined reference to `__builtin_thread_pointer') when I try to buil

Re: __builtin_thread_pointer

2025-02-11 Thread Dimitry Andric via Cygwin
It's a gcc builtin function, not something implemented in an external library. Therefore, there is no linker option that can fix this. Also, as far as I can see from gcc's documentation, __builtin_thread_pointer() is only supported for the RISCV and SH architectures. Then ag

__builtin_thread_pointer

2025-02-11 Thread Ken Brown via Cygwin
Does Cygwin support __builtin_thread_pointer? I'm guessing not, because I'm getting a link error (undefined reference to `__builtin_thread_pointer') when I try to build some software that uses it. Or is there something that would have to be added to the link command line? T