tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PATCH libatomic



On 10.05.2020 20:25, Joerg Sonnenberger wrote:
> On Sun, May 10, 2020 at 06:16:49PM +0200, Kamil Rytarowski wrote:
>> On 08.05.2020 21:33, maya%NetBSD.org@localhost wrote:
>>> On Fri, May 08, 2020 at 04:09:02PM +0200, Kamil Rytarowski wrote:
>>>> I object to opinions that libatomic is generally broken, if that would
>>>> be the cause, it wouldn't be available and used on relatively all
>>>> relevant generic purpose Operating Systems. Personally, I already
>>>> received last year a feedback from one 3rd party project from Microsoft
>>>> that they prefer to drop NetBSD support (out of Windows, Linux, MacOS,
>>>> BSDs) rather than allow non-libatomic usage.
>>>
>>> You need to stop being ambiguous about the rationale, it's not helping
>>> your arguments sound strong. Name the project and link to the
>>> discussion.
>>>
>>
>>
>> NetBSD support #77
>> https://github.com/microsoft/snmalloc/pull/77#issuecomment-517375185
> 
> I find it funny that you pick an example where correctly working
> atomic implementation is essential and where the only reason it is
> pulled in is a bug in GCC.
> 

GCC's usage of libatomic is conservative as not all 64-bit x86 CPUs
implement the call and GCC uses libatomic here.

Functional atomic implementation is indeed essential in this software,
but it is broken for NetBSD (we emit libatomic calls and not ship the
library).

snmalloc also works and is tested (reference:  azure-pipelines.yml) on
32-bit platforms.

Thus NetBSD is the only broken OS by default and received a dedicated
note in README:

Building on UNIX-like platforms

snmalloc has platform abstraction layers for XNU (macOS, iOS, and so
on), FreeBSD, NetBSD, OpenBSD, and Linux and is expected to work out of
the box on these systems. Please open issues if it does not. Note that
NetBSD, by default, ships with a toolchain that emits calls to libatomic
but does not ship libatomic. To use snmalloc on NetBSD, you must either
acquire a libatomic implementation (for example, from the GCC or LLVM
project) or compile with clang.

> Joerg
> 


Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index