From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavan Nikhilesh Subject: Re: [PATCH] eal: fix clang compilation error on ARM64 Date: Wed, 11 Apr 2018 14:08:20 +0530 Message-ID: <20180411083819.GA27100@ltp-pvn> References: <20180406110103.29163-1-pbhagavatula@caviumnetworks.com> <20180406182516.GA13313@ltp-pvn> <8961764.He0omIczL0@xps> <3084545.g1xfDtWPys@xps> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: Thomas Monjalon , techboard@dpdk.org Return-path: Content-Disposition: inline In-Reply-To: <3084545.g1xfDtWPys@xps> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. > > 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 > > >