From owner-freebsd-current@freebsd.org Mon Jan 15 18:26:29 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEBA3E6C1A0; Mon, 15 Jan 2018 18:26:29 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay111.isp.belgacom.be (mailrelay111.isp.belgacom.be [195.238.20.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign Organization Validation CA - SHA256 - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CBF0F6355B; Mon, 15 Jan 2018 18:26:28 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes IronPort-PHdr: =?us-ascii?q?9a23=3AETblLRcR5zyfj3zo/6KAZpSFlGMj4u6mDksu8pMi?= =?us-ascii?q?zoh2WeGdxc26ZxON2/xhgRfzUJnB7Loc0qyK6/mmATRIyK3CmUhKSIZLWR4BhJ?= =?us-ascii?q?detC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+?= =?us-ascii?q?KPjrFY7OlcS30P2594HObwlSizexfa5+IA+qoQnNq8IbnZZsJqEtxxXTv3BGYf?= =?us-ascii?q?5WxWRmJVKSmxbz+MK994N9/ipTpvws6ddOXb31cKokQ7NYCi8mM30u683wqRbD?= =?us-ascii?q?VwqP6WACXWgQjxFFHhLK7BD+Xpf2ryv6qu9w0zSUMMHqUbw5Xymp4rx1QxH0li?= =?us-ascii?q?gIKz858HnWisNuiqJbvAmhrAF7z4LNfY2ZKOZycqbbcNgHR2ROQ9xRWjRPDI28?= =?us-ascii?q?cYUBEukPMuRWr4byu1QAogCzBRWuCe/z1jNEmmP60bM83u88EQ/GxgsgH9cWvX?= =?us-ascii?q?rKrdX1NqMSWv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fzGiKlG9CXQNaaomD?= =?us-ascii?q?WmoQMBiF5e/l71/PGuf9QY8sNRFMnIvbcvNH?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2DABABJ8Vxa/4aF9lFdGQEBAQEBAQEBA?= =?us-ascii?q?QEBAQcBAQEBAYNBVhB0FBOPK41qAQGCATIBmQ8thRgChFBDFQEBAQEBAQEBAQF?= =?us-ascii?q?qKII4JAGCRwEFOhwjEAsOCgklDyoeBhOKNwysGolJAQEBAQEBAQEBAQEBAQEBA?= =?us-ascii?q?QEcBY0/gy8EGYdSBaNkiAyNMoEAkx2NPosjNSOBUEwwCIJnhFhANwGNCwEBAQ?= X-IPAS-Result: =?us-ascii?q?A2DABABJ8Vxa/4aF9lFdGQEBAQEBAQEBAQEBAQcBAQEBAYN?= =?us-ascii?q?BVhB0FBOPK41qAQGCATIBmQ8thRgChFBDFQEBAQEBAQEBAQFqKII4JAGCRwEFO?= =?us-ascii?q?hwjEAsOCgklDyoeBhOKNwysGolJAQEBAQEBAQEBAQEBAQEBAQEcBY0/gy8EGYd?= =?us-ascii?q?SBaNkiAyNMoEAkx2NPosjNSOBUEwwCIJnhFhANwGNCwEBAQ?= Received: from 134.133-246-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.246.133.134]) by relay.skynet.be with ESMTP; 15 Jan 2018 19:26:25 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id w0FIQPCq080268; Mon, 15 Jan 2018 19:26:25 +0100 (CET) (envelope-from tijl@FreeBSD.org) Date: Mon, 15 Jan 2018 19:26:25 +0100 From: Tijl Coosemans To: Dimitry Andric Cc: Luca Pizzamiglio , FreeBSD Current , FreeBSD Ports , Ed Maste 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: <85AE8E52-FC6C-4522-B5B1-7423A163DDFE@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jan 2018 18:26:30 -0000 On Mon, 15 Jan 2018 18:37:47 +0100 Dimitry Andric wrote: > On 15 Jan 2018, at 11:43, Luca Pizzamiglio 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.