From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas@monjalon.net>
Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com
 [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 6BE181B7DF;
 Tue, 10 Apr 2018 23:35:17 +0200 (CEST)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id CCEE620D56;
 Tue, 10 Apr 2018 17:35:16 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute1.internal (MEProxy); Tue, 10 Apr 2018 17:35:16 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 cc:content-transfer-encoding:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-sender
 :x-me-sender:x-sasl-enc; s=mesmtp; bh=lPzLD5jNBfEJcr7iB7xOlRXwAq
 xzVG0lv9t9BU+klqI=; b=RjA2iY1/0BHaGtMCVOtZdA3WWSZPWN/AY/KaZYORwE
 wN0RFHvLWkm+tL8psxlwA1BH5JTXd06SOuWE08a7FgGpOfikxviEvxtj/A6/Y0iR
 aqVzPzxTKitUg21s267atCw2Cwfk6k7yd8Y+PayFUA3fw8i0LIS7F2XTpgHb6I9d
 4=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:from:in-reply-to:message-id:mime-version:references
 :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=lPzLD5
 jNBfEJcr7iB7xOlRXwAqxzVG0lv9t9BU+klqI=; b=kSNtchLjH8KT6/0d+SvdD+
 vqer1Bhm1B67+oaAKHYxurbhgdZ5FyTzQsndjgEH1b82fS7XuIT3AGAUEMqn34Sm
 WN711hrwOd6Xy0F43Jl+TMsvJJwsc7gWP9SmcV7GF++s45q3TTAokRs/wrTgRq9H
 NndH01bRySAM4bo8opPWje+6w2gkEWlUuTBYTt903LtYNzbTGi3QtBZ11tEXvdTr
 KwwOavMjzg9AOJur+aXubRDYFhGxtIVVnVo1LTptRdgprZpHQo8CSIZnZiaX4FC3
 5SJZmH1m8JormNXhtzH70XXBmsgX2BUMo7FizB9v6Oj/DL6vzkfFbzARJHRP0AxQ
 ==
X-ME-Sender: <xms:FC7NWiiXeBqnqqAzqaZ9hphSrX1ERMdPMFh2JHvaccFtbCpGTMawXw>
Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id 39F65E4472;
 Tue, 10 Apr 2018 17:35:16 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Cc: dev@dpdk.org, techboard@dpdk.org
Date: Tue, 10 Apr 2018 23:35:15 +0200
Message-ID: <3084545.g1xfDtWPys@xps>
In-Reply-To: <8961764.He0omIczL0@xps>
References: <20180406110103.29163-1-pbhagavatula@caviumnetworks.com>
 <20180406182516.GA13313@ltp-pvn> <8961764.He0omIczL0@xps>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Subject: Re: [dpdk-dev] [PATCH] eal: fix clang compilation error on ARM64
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Apr 2018 21:35:17 -0000

Hi, big issue here.
This patch does not compile on Linux with ICC or GCC < 4.9
because of a missing C11 header:
	#include <stdatomic.h>

GCC 4.9 is recommended in doc/guides/linux_gsg/sys_reqs.rst.
But GCC 4.8 is used by SLES 12, RHEL 7, etc...

Note: Intel compilation tests are running with a backlog of one week,
so cannot catch such fail.

Exceptionnaly, I have decided to remove this patch pushed few hours ago
(not reverting), in order to avoid a serious "git bisect" breakage
in the middle of the git history.

We'll need to find a better way of fixing the compilation error
seen on ARM with clang.
To make it clear: I believe it is more important to preserve GCC 4.8
than clang compilation.
By the way, what is the version of clang which was causing the error?

The error was:
	include/generic/rte_atomic.h:215:9: error:
		implicit declaration of function '__atomic_exchange_2'
		is invalid in C99
	include/generic/rte_atomic.h:494:9: error:
		implicit declaration of function '__atomic_exchange_4'
		is invalid in C99
	include/generic/rte_atomic.h:772:9: error:
		implicit declaration of function '__atomic_exchange_8'
		is invalid in C99

The proposed solution was:
	Use __atomic_exchange_n instead of __atomic_exchange_(2/4/8),
	and include stdatomic.h.



10/04/2018 17:07, Thomas Monjalon:
> 06/04/2018 20:25, Pavan Nikhilesh:
> > On Fri, Apr 06, 2018 at 06:24:34PM +0200, Thomas Monjalon wrote:
> > > 06/04/2018 13:01, Pavan Nikhilesh:
> > > > Use __atomic_exchange_n instead of __atomic_exchange_(2/4/8).
> > > >
> > > > Fixes: ff2863570fcc ("eal: introduce atomic exchange operation")
[...]
> Applied (with error log), thanks