Re: [PATCH] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-09 Thread Mark Geisert
Hi all, Brian Inglis wrote: On 2023-07-08 15:53, Mark Geisert wrote: Mark Geisert wrote: I got tripped up by misspelling and not being able to link clang{,++} programs on my test system.  I checked the .o files with objdump: Clang and clang++ both support __builtin_popcountl, but they emit co

Re: [PATCH] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-08 Thread Brian Inglis
On 2023-07-08 15:53, Mark Geisert wrote: Mark Geisert wrote: I got tripped up by misspelling and not being able to link clang{,++} programs on my test system.  I checked the .o files with objdump: Clang and clang++ both support __builtin_popcountl, but they emit code for the Hackers Delight al

Re: [PATCH] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-08 Thread Mark Geisert
Mark Geisert wrote: [... blah blah ...] I got tripped up by misspelling and not being able to link clang{,++} programs on my test system. I checked the .o files with objdump: Clang and clang++ both support __builtin_popcountl, but they emit code for the Hackers Delight algorithm rather than u

Re: [PATCH] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-08 Thread Mark Geisert
Brian Inglis wrote: On 2023-07-07 12:54, Brian Inglis wrote: On 2023-07-07 03:44, Corinna Vinschen wrote: Hi Mark, On Jul  7 00:41, Mark Geisert wrote: The current version of cannot be compiled by Clang due to the use of __builtin* functions.  Their presence here was a dubious optimization a

Re: [PATCH] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-08 Thread Brian Inglis
On 2023-07-07 12:54, Brian Inglis wrote: On 2023-07-07 03:44, Corinna Vinschen wrote: Hi Mark, On Jul  7 00:41, Mark Geisert wrote: The current version of cannot be compiled by Clang due to the use of __builtin* functions.  Their presence here was a dubious optimization anyway, so their usage

Re: [PATCH] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-07 Thread Brian Inglis
On 2023-07-07 03:44, Corinna Vinschen wrote: Hi Mark, On Jul 7 00:41, Mark Geisert wrote: The current version of cannot be compiled by Clang due to the use of __builtin* functions. Their presence here was a dubious optimization anyway, so their usage has been converted to standard library fu

Re: [PATCH] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-07 Thread Corinna Vinschen
On Jul 7 16:46, Jon Turney wrote: > On 07/07/2023 10:44, Corinna Vinschen wrote: > > Hi Mark, > > > > On Jul 7 00:41, Mark Geisert wrote: > > > The current version of cannot be compiled by Clang due to > > > the use of __builtin* functions. Their presence here was a dubious > > > optimization

Re: [PATCH] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-07 Thread Jon Turney
On 07/07/2023 10:44, Corinna Vinschen wrote: Hi Mark, On Jul 7 00:41, Mark Geisert wrote: The current version of cannot be compiled by Clang due to the use of __builtin* functions. Their presence here was a dubious optimization anyway, so their usage has been converted to standard library fu

Re: [PATCH] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-07 Thread Corinna Vinschen
On Jul 7 03:13, Mark Geisert wrote: > Hi Corinna, > > Corinna Vinschen wrote: > > On Jul 7 00:41, Mark Geisert wrote: > > > The current version of cannot be compiled by Clang due to > > > the use of __builtin* functions. Their presence here was a dubious > > > optimization anyway, so their usa

Re: [PATCH] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-07 Thread Mark Geisert
Hi Corinna, Corinna Vinschen wrote: On Jul 7 00:41, Mark Geisert wrote: The current version of cannot be compiled by Clang due to the use of __builtin* functions. Their presence here was a dubious optimization anyway, so their usage has been converted to standard library functions. A popcnt

Re: [PATCH] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-07 Thread Corinna Vinschen
Hi Mark, On Jul 7 00:41, Mark Geisert wrote: > The current version of cannot be compiled by Clang due to > the use of __builtin* functions. Their presence here was a dubious > optimization anyway, so their usage has been converted to standard > library functions. A popcnt (population count of

[PATCH] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-07 Thread Mark Geisert
The current version of cannot be compiled by Clang due to the use of __builtin* functions. Their presence here was a dubious optimization anyway, so their usage has been converted to standard library functions. A popcnt (population count of 1 bits in a word) function is provided here because the