Richard Earnshaw <rearn...@arm.com> writes:

> Older versions of the Arm architecture lack support for __sync
> operations directly in hardware and require calls into appropriate
> operating-system hooks.  But such hooks obviously don't exist in a
> freestanding environment.
>
> Consquently, it is incorrect to assume during configure that such
> functions will exist and we need a configure-time check to determine
> whether or not these routines will work.
>
> libbacktrace:
>
>       * configure.ac: Always check if the compiler supports __sync
>       operations.
>       * configure: Regenerated.
> ---
>
> A consequence of this assumption that these functions 'just work' (TM)
> is that we build libbacktrace with threading support, but that then
> fails at link time when we find out that they do not.  I'm not sure I
> really understand why we can assume that having with_target_subdir set
> is enough to assume that the operations exist: it isn't for Arm and it
> looks like it wasn't for hpux either.  Perhaps the whole logic here
> needs reconsideration...

My understanding was that libatomic would provide implementations of the
__sync operations where required. I guess that is not always the case,
though I don't understand why that should be.

In any case, this patch is fine.

Thanks.

Ian

Reply via email to