Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jan 2018 19:26:25 +0100
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        Dimitry Andric <dim@FreeBSD.org>
Cc:        Luca Pizzamiglio <pizzamig@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org>, FreeBSD Ports <freebsd-ports@freebsd.org>, Ed Maste <emaste@freebsd.org>
Subject:   Re: atomic in i386 Current after CLANG 6 upgrade
Message-ID:  <20180115192625.6c3186a0@kalimero.tijl.coosemans.org>
In-Reply-To: <85AE8E52-FC6C-4522-B5B1-7423A163DDFE@FreeBSD.org>
References:  <CAB88xy96bTtauBJtZyRbZCVDgKtgpv%2BQiZ29aWqe%2B_dud9domA@mail.gmail.com> <85AE8E52-FC6C-4522-B5B1-7423A163DDFE@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 15 Jan 2018 18:37:47 +0100 Dimitry Andric <dim@FreeBSD.org> wrote:
> On 15 Jan 2018, at 11:43, Luca Pizzamiglio <pizzamig@freebsd.org> wrote:
>> I've already received a couple of messages from pkg-fallout about build
>> failure on head-i386-default [1] [2] both pointing to the same errors,
>> about missing intrinsic symbols related to __atomic_*
>> 
>> The clang documentation about C11 atomic builtins [3] stats that __atomic_*
>> are GCC extension and Clang provides them.
>> 
>> It seems to me that this specific GCC-compatible builtin are enabled on
>> amd64, but not on i386.
>> Is there a way to enable GCC compatible __atomic_ builtin also on i386?
>> Or should I provide patches to adopt _c11_atomic_* instead of __atomic_*
>> for every ports that need it ?
> 
> There is some strangeness going on with an upstream bug fix [1], which
> has the unintended side effect of sometimes emitting libcalls to
> __atomic functions that we do not have on i386.  I've commented on the
> upstream bug report, but I do not know an easy workaround at this
> point.
> 
> [1] https://bugs.llvm.org/show_bug.cgi?id=34347

It looks to me clang is doing fewer libcalls now and more inlining,
which is why the configure tests succeed now.  That clang generates
cmpxchg8b on i486 has always been the case.  The fix for 34347 exposes
this more now.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180115192625.6c3186a0>