From: "Richardson, Bruce" <bruce.richardson@intel.com>
To: Ilya Maximets <i.maximets@samsung.com>,
"dev@dpdk.org" <dev@dpdk.org>,
Thomas Monjalon <thomas@monjalon.net>
Cc: Pavan Nikhilesh <pbhagavatula@marvell.com>,
"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] eal: fix build of external apps with clang on armv8
Date: Mon, 14 Jan 2019 16:46:45 +0000 [thread overview]
Message-ID: <59AF69C657FD0841A61C55336867B5B07271E870@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <20190114161442.8277-1-i.maximets@samsung.com>
> -----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 <thomas@monjalon.net>
> Cc: Pavan Nikhilesh <pbhagavatula@marvell.com>; Ilya Maximets
> <i.maximets@samsung.com>; 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 <i.maximets@samsung.com>
> ---
> 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?
next prev parent reply other threads:[~2019-01-14 16:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20190114161447eucas1p1c1d73ede17b706e69a4db491f8c94578@eucas1p1.samsung.com>
2019-01-14 16:14 ` Ilya Maximets
2019-01-14 16:27 ` Thomas Monjalon
2019-01-14 18:49 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2019-01-14 19:06 ` Thomas Monjalon
2019-01-14 16:46 ` Richardson, Bruce [this message]
2019-01-15 11:32 ` [dpdk-dev] " Ilya Maximets
2019-01-14 16:50 ` Honnappa Nagarahalli
2019-01-14 18:47 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=59AF69C657FD0841A61C55336867B5B07271E870@IRSMSX103.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=i.maximets@samsung.com \
--cc=pbhagavatula@marvell.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).