From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] eal: fix clang compilation error on ARM64 Date: Tue, 10 Apr 2018 17:07:15 +0200 Message-ID: <8961764.He0omIczL0@xps> References: <20180406110103.29163-1-pbhagavatula@caviumnetworks.com> <1655998.KI4tD34sB9@xps> <20180406182516.GA13313@ltp-pvn> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, jerin.jacob@caviumnetworks.com, ferruh.yigit@intel.com, stephen@networkplumber.org, konstantin.ananyev@intel.com To: Pavan Nikhilesh Return-path: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 4D6911B82B for ; Tue, 10 Apr 2018 17:07:18 +0200 (CEST) In-Reply-To: <20180406182516.GA13313@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" 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") > > > > Please, could you provide a log of the error? > > CC eal.o > In file included from /root/dpdk/lib/librte_eal/linuxapp/eal/eal.c:33: > In file included from /root/dpdk/build/include/rte_eal_memconfig.h:13: > In file included from /root/dpdk/build/include/rte_rwlock.h:10: > In file included from /root/dpdk/build/include/generic/rte_rwlock.h:25: > In file included from /root/dpdk/build/include/rte_atomic.h:37: > In file included from /root/dpdk/build/include/rte_atomic_64.h:16: > /root/dpdk/build/include/generic/rte_atomic.h:215:9: error: implicit declaration of function '__atomic_exchange_2' is invalid in C99 [-Werror,-Wimplicit-function-declaration] > return __atomic_exchange_2(dst, val, __ATOMIC_SEQ_CST); > ^ > /root/dpdk/build/include/generic/rte_atomic.h:215:9: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] > /root/dpdk/build/include/generic/rte_atomic.h:494:9: error: implicit declaration of function '__atomic_exchange_4' is invalid in C99 [-Werror,-Wimplicit-function-declaration] > return __atomic_exchange_4(dst, val, __ATOMIC_SEQ_CST); > ^ > /root/dpdk/build/include/generic/rte_atomic.h:494:9: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] > /root/dpdk/build/include/generic/rte_atomic.h:772:9: error: implicit declaration of function '__atomic_exchange_8' is invalid in C99 [-Werror,-Wimplicit-function-declaration] > return __atomic_exchange_8(dst, val, __ATOMIC_SEQ_CST); > ^ > /root/dpdk/build/include/generic/rte_atomic.h:772:9: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] > 6 errors generated. > make[5]: *** [/root/dpdk/mk/internal/rte.compile-pre.mk:116: eal.o] Error 1 > > > > > > Why __atomic_exchange_n is fixing the compilation? > > I guess __atomic_exchange_2/5/8 fall under c++11 standard? > https://llvm.org/docs/Atomics.html Applied (with error log), thanks