Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jan 2018 12:57:56 +0100
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        Luca Pizzamiglio <pizzamig@freebsd.org>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>, freebsd-ports@freebsd.org
Subject:   Re: atomic in i386 Current after CLANG 6 upgrade
Message-ID:  <20180115125756.37b803ba@kalimero.tijl.coosemans.org>
In-Reply-To: <CAB88xy96bTtauBJtZyRbZCVDgKtgpv%2BQiZ29aWqe%2B_dud9domA@mail.gmail.com>
References:  <CAB88xy96bTtauBJtZyRbZCVDgKtgpv%2BQiZ29aWqe%2B_dud9domA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 15 Jan 2018 11:43:44 +0100 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 ?
> 
> [1]
> http://beefy11.nyi.freebsd.org/data/head-i386-default/p458948_s327953/logs/librdkafka-0.11.3.log
> [2]
> http://beefy11.nyi.freebsd.org/data/head-i386-default/p458948_s327953/logs/stress-ng-0.09.09.log
> [3] https://clang.llvm.org/docs/LanguageExtensions.html#langext-c11-atomic

8 byte atomics requires at least i586.  So either find a way to disable
the use of these atomics in these ports or add something like this to
the port Makefile.

.if ${ARCH} == i386 && ! ${MACHINE_CPU:Mi586}
CFLAGS+=	-march=i586
.endif



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