From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] eal: fix clang compilation error on ARM64 Date: Wed, 11 Apr 2018 10:46:47 +0200 Message-ID: <2267766.OAdEpiXt1a@xps> References: <20180406110103.29163-1-pbhagavatula@caviumnetworks.com> <3084545.g1xfDtWPys@xps> <20180411083819.GA27100@ltp-pvn> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: techboard@dpdk.org, dev@dpdk.org To: Pavan Nikhilesh Return-path: In-Reply-To: <20180411083819.GA27100@ltp-pvn> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 11/04/2018 10:38, Pavan Nikhilesh: > On Tue, Apr 10, 2018 at 11:35:15PM +0200, Thomas Monjalon wrote: > > Hi, big issue here. > > This patch does not compile on Linux with ICC or GCC < 4.9 > > because of a missing C11 header: > > #include > > > > 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? > > I have tried with clang 4/5/6 and all have the same issue. Do you know why the issue is not seen on x86? > > 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