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: > > movq%fs:0, %rax > mov

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
On 2025-02-11 15:52, Dimitry Andric via Cygwin wrote: On 11 Feb 2025, at 23:25, Brian Inglis wrote: 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 vi

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 getting a l

Re: __builtin_thread_pointer

2025-02-11 Thread Dimitry Andric via Cygwin
On 11 Feb 2025, at 23:25, Brian Inglis wrote: > > 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

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 getting a l

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_pointer() is only supported for

Re: __builtin_thread_pointer

2025-02-11 Thread Dimitry Andric via Cygwin
It does not look like it's supported by Cygwin's gcc: $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/12/lto-wrapper.exe Target: x86_64-pc-cygwin Configured with: /mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-12.4.0/configure --srcdir=/mnt/share/cygpkg

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 build some software that

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 again, gcc's implement