From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 23CB95B2E for ; Tue, 15 Jan 2019 12:32:43 +0100 (CET) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190115113242euoutp02fdceecf387446b257c1ac500606cce48~6Ak98YiKQ0582705827euoutp02y for ; Tue, 15 Jan 2019 11:32:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190115113242euoutp02fdceecf387446b257c1ac500606cce48~6Ak98YiKQ0582705827euoutp02y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1547551962; bh=xMpGWEpZgQ44Uy2AykqssQs8vkm3bZFUQHi2EMLHgRA=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=Bq+d8qc3m2p8G+hAnfebQxBREQjCCX9ab48tZ2JSbtk8on4cNfW80VoGYvTTMGq/r mwnwkD/hpevTy8SuQ9XpZz8y9v++9eYMpzYzTvXf79XXp+JzKycfHOcBqT7rLfhc+M bL5PJ3npkYlK8LSd7wxr5BEgQZLz8XAtwoF22dg4= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190115113241eucas1p20f74d0f71651a454ec37369be2c4c66e~6Ak9aACwU1660416604eucas1p2W; Tue, 15 Jan 2019 11:32:41 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id CD.3A.04294.9D4CD3C5; Tue, 15 Jan 2019 11:32:41 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20190115113241eucas1p25b3aab350fb3fecdb459536a5363d426~6Ak8rOwbr1660416604eucas1p2V; Tue, 15 Jan 2019 11:32:41 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190115113240eusmtrp2e0702797ab0d8a8df53fc9b2be96beaf~6Ak8c5m2j2113621136eusmtrp2M; Tue, 15 Jan 2019 11:32:40 +0000 (GMT) X-AuditID: cbfec7f4-835ff700000010c6-d7-5c3dc4d9997d Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 34.26.04128.8D4CD3C5; Tue, 15 Jan 2019 11:32:40 +0000 (GMT) Received: from [106.109.129.180] (unknown [106.109.129.180]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190115113240eusmtip1d4ee3f7c50ed5910c2321a7a9ae33ace~6Ak8AHJxU0227402274eusmtip1H; Tue, 15 Jan 2019 11:32:40 +0000 (GMT) To: "Richardson, Bruce" , "dev@dpdk.org" , Thomas Monjalon Cc: Pavan Nikhilesh , "stable@dpdk.org" From: Ilya Maximets Message-ID: <82f4f80e-f77c-9348-05bb-4bfd2cb9234e@samsung.com> Date: Tue, 15 Jan 2019 14:32:39 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <59AF69C657FD0841A61C55336867B5B07271E870@IRSMSX103.ger.corp.intel.com> Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrMKsWRmVeSWpSXmKPExsWy7djPc7o3j9jGGNxdJmtxY5W9xbtP25ks rrT/ZLc43vORxeJfxx92i08PTrA4sHn8WrCU1WPxnpdMHpMXXmT2OHZzGrtH35ZVjAGsUVw2 Kak5mWWpRfp2CVwZH+btZCl4L12x/IpiA+NU8S5GTg4JAROJyWuPMXYxcnEICaxglNi1dA4r hPOFUeL03kfsEM5nRokH7fOZYFrWvN/LCmILCSxnlFh0RRii6COjxLmGn8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T7CCGLzCthJ3Lp5BGwki4CqxKKm3ewgtqhAhMTZl+ugagQlTs58wgJicwqESFy+0gRWwyyg LvFn3iVmCFtcounLSlYIW15i+9s5zBMYhWYhaZ+FpGUWkpZZSFoWMLKsYhRJLS3OTc8tNtIr TswtLs1L10vOz93ECIyybcd+btnB2PUu+BCjAAejEg+vw3ybGCHWxLLiytxDjBIczEoivGVO QCHelMTKqtSi/Pii0pzU4kOMpkDPTWSWEk3OByaAvJJ4Q1NDcwtLQ3Njc2MzCyVx3vMGlVFC AumJJanZqakFqUUwfUwcnFINjL7mMi19etoy67rC2XZ6i78RF4/k9/Bf2KK9+mbv3Tc3Tz29 pB3Gd+C5iZ3DEp3sq6tSvZfaGdZIlL1tOG8402h6m8ZT57PRnPmB3GUhH96/+flKpG2XfQ/T 3plrtq378a+9yfn/6pTVuaEfj7fv7Ipm+Z/XbZWeKbQ749adF2Lb51pcnhSYrsRSnJFoqMVc VJwIAOBvOD/IAgAA X-CMS-MailID: 20190115113241eucas1p25b3aab350fb3fecdb459536a5363d426 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190114161447eucas1p1c1d73ede17b706e69a4db491f8c94578 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190114161447eucas1p1c1d73ede17b706e69a4db491f8c94578 References: <20190114161442.8277-1-i.maximets@samsung.com> <59AF69C657FD0841A61C55336867B5B07271E870@IRSMSX103.ger.corp.intel.com> Subject: Re: [dpdk-dev] [PATCH] eal: fix build of external apps with clang on armv8 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 11:32:43 -0000 On 14.01.2019 19:46, Richardson, Bruce wrote: > > >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ilya Maximets >> Sent: Monday, January 14, 2019 4:15 PM >> To: dev@dpdk.org; Thomas Monjalon >> Cc: Pavan Nikhilesh ; Ilya Maximets >> ; stable@dpdk.org >> Subject: [dpdk-dev] [PATCH] eal: fix build of external apps with clang on >> armv8 >> >> In case DPDK built using GCC, RTE_TOOLCHAIN_CLANG is not defined. >> But 'rte_atomic.h' is a generic header that included to the external apps >> like OVS while building with DPDK. As a result, clang build of OVS fails >> on ARMv8 if DPDK built using gcc: >> >> 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 >> >> We need to check for current compiler, not the compiler used for DPDK >> build. >> >> Fixes: 7bdccb93078e ("eal: fix ARM build with clang") >> Cc: stable@dpdk.org >> >> Signed-off-by: Ilya Maximets >> --- >> lib/librte_eal/common/include/generic/rte_atomic.h | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/lib/librte_eal/common/include/generic/rte_atomic.h >> b/lib/librte_eal/common/include/generic/rte_atomic.h >> index b99ba4688..d0c464fb1 100644 >> --- a/lib/librte_eal/common/include/generic/rte_atomic.h >> +++ b/lib/librte_eal/common/include/generic/rte_atomic.h >> @@ -212,7 +212,7 @@ rte_atomic16_exchange(volatile uint16_t *dst, uint16_t >> val); static inline uint16_t rte_atomic16_exchange(volatile uint16_t >> *dst, uint16_t val) { -#if defined(RTE_ARCH_ARM64) && >> defined(RTE_TOOLCHAIN_CLANG) >> +#if defined(RTE_ARCH_ARM64) && defined(__clang__) >> return __atomic_exchange_n(dst, val, __ATOMIC_SEQ_CST); #else >> return __atomic_exchange_2(dst, val, __ATOMIC_SEQ_CST); @@ -495,7 >> +495,7 @@ rte_atomic32_exchange(volatile uint32_t *dst, uint32_t val); >> static inline uint32_t rte_atomic32_exchange(volatile uint32_t *dst, >> uint32_t val) { -#if defined(RTE_ARCH_ARM64) && >> defined(RTE_TOOLCHAIN_CLANG) >> +#if defined(RTE_ARCH_ARM64) && defined(__clang__) >> return __atomic_exchange_n(dst, val, __ATOMIC_SEQ_CST); #else >> return __atomic_exchange_4(dst, val, __ATOMIC_SEQ_CST); @@ -777,7 >> +777,7 @@ rte_atomic64_exchange(volatile uint64_t *dst, uint64_t val); >> static inline uint64_t rte_atomic64_exchange(volatile uint64_t *dst, >> uint64_t val) { -#if defined(RTE_ARCH_ARM64) && >> defined(RTE_TOOLCHAIN_CLANG) >> +#if defined(RTE_ARCH_ARM64) && defined(__clang__) >> return __atomic_exchange_n(dst, val, __ATOMIC_SEQ_CST); #else >> return __atomic_exchange_8(dst, val, __ATOMIC_SEQ_CST); >> -- >> 2.17.1 > > Is this really architecture-specific? Would the same issue not occur on e.g. x86 or PPC? > Yes. I looked a bit deeper and found that x86 build is also broken. We have not encountered this problem earlier on other platforms because CONFIG_RTE_FORCE_INTRINSICS enabled by default only for armv8. I've sent a patch: http://patches.dpdk.org/patch/49829/ Best regards, Ilya Maximets.