From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavan Nikhilesh Subject: Re: [PATCH] eal: fix clang compilation error on ARM64 Date: Fri, 6 Apr 2018 23:55:18 +0530 Message-ID: <20180406182516.GA13313@ltp-pvn> References: <20180406110103.29163-1-pbhagavatula@caviumnetworks.com> <1655998.KI4tD34sB9@xps> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: Thomas Monjalon , jerin.jacob@caviumnetworks.com, ferruh.yigit@intel.com, stephen@networkplumber.org, konstantin.ananyev@intel.com Return-path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0083.outbound.protection.outlook.com [104.47.38.83]) by dpdk.org (Postfix) with ESMTP id 496D41CCFC for ; Fri, 6 Apr 2018 20:25:44 +0200 (CEST) Content-Disposition: inline In-Reply-To: <1655998.KI4tD34sB9@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 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 > > >