DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: David Marchand <david.marchand@redhat.com>
Cc: Ruifeng Wang <ruifeng.wang@arm.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	 Jerin Jacob <jerinj@marvell.com>,
	Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,
	dev <dev@dpdk.org>,  nd <nd@arm.com>,
	Feifei Wang <feifei.wang2@arm.com>
Subject: Re: [dpdk-dev] [PATCH 1/2] eal/arm: fix gcc build for optimization level 0
Date: Fri, 27 Nov 2020 15:03:48 +0530
Message-ID: <CALBAE1MxYnsMbAaFeyhZp5tEv1PkvE-4+LYZ_KZniEueEuGPuQ@mail.gmail.com> (raw)
In-Reply-To: <CAJFAV8wu8OrmKMkDsT8vRv75YyY6+_fN=uUthQEOMZ9VRJwarg@mail.gmail.com>

On Fri, Nov 27, 2020 at 2:56 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> On Fri, Nov 27, 2020 at 9:51 AM Jerin Jacob <jerinjacobk@gmail.com> wrote:
> >
> > On Fri, Nov 27, 2020 at 2:09 PM David Marchand
> > <david.marchand@redhat.com> wrote:
> > >
> > > On Fri, Nov 27, 2020 at 9:10 AM Ruifeng Wang <ruifeng.wang@arm.com> wrote:
> > > >
> > > > Gcc build with '-O0' on platforms with RTE_ARM_FEATURE_ATOMICS set
> > > > failed for:
> > > >  ../lib/librte_efd/rte_efd.c
> > > >  Assembler messages:
> > > > 3866: Error: selected processor does not support `crc32cb w0,w0,w1'
> > > > 3890: Error: selected processor does not support `crc32ch w0,w0,w1'
> > > > 3914: Error: selected processor does not support `crc32cw w0,w0,w1'
> > > > 3938: Error: selected processor does not support `crc32cx w0,w0,x1'
> > > >
> > > > This was caused by an architecture specifier added for Clang.
> > > > Unlike Clang, Gcc considers each inline assembly block to be dependent
> > > > and therefor, the architecture specifier impacts assemble of some
> > > > blocks require certain extension support.
> > >
> > > I reproduced this error with -O0 for config/arm/arm64_octeontx2_linux_gcc.
> > > The patch looks simple enough and it only affects ARM builds.
> > >
> > > Jerin,
> > > Are you okay with this change for 20.11?
> > > Or should we wait 21.02?
> >
> > I could reproduce the issue with meson  build -Dbuildtype=debug
> > --cross-file config/arm/arm64_octeontx2_linux_gcc
> >
> > This fix is OK. Request to merge for 20.11
> >
> > Acked-by: Jerin Jacob <jerinj@marvell.com>
>
> Ruifeng, Andrew,
>
> I get a compilation error with this patch on sfc using gcc and
> config/arm/arm64_octeontx2_linux_gcc config + --buildtype=debug and/or
> -Dc_args=-O0 .
>
> aarch64-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture
> 8.2-2019.01 (arm-rel-8.28)) 8.2.1 20180802
>
> FAILED: drivers/common/sfc_efx/base/932d09a@@sfc_base@sta/efx_crc32.c.o
> aarch64-linux-gnu-gcc
> -Idrivers/common/sfc_efx/base/932d09a@@sfc_base@sta
> -Idrivers/common/sfc_efx/base -I../../dpdk/drivers/common/sfc_efx/base
> -Idrivers/common/sfc_efx -I../../dpdk/drivers/common/sfc_efx -I.
> -I../../dpdk/ -Iconfig -I../../dpdk/config -Ilib/librte_eal/include
> -I../../dpdk/lib/librte_eal/include -Ilib/librte_eal/linux/include
> -I../../dpdk/lib/librte_eal/linux/include -Ilib/librte_eal/arm/include
> -I../../dpdk/lib/librte_eal/arm/include -Ilib/librte_eal/common
> -I../../dpdk/lib/librte_eal/common -Ilib/librte_eal
> -I../../dpdk/lib/librte_eal -Ilib/librte_kvargs
> -I../../dpdk/lib/librte_kvargs
> -Ilib/librte_telemetry/../librte_metrics
> -I../../dpdk/lib/librte_telemetry/../librte_metrics
> -Ilib/librte_telemetry -I../../dpdk/lib/librte_telemetry
> -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall
> -Winvalid-pch -Werror -g -include rte_config.h -Wextra -Wcast-qual
> -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security
> -Wmissing-declarations -Wmissing-prototypes -Wnested-externs
> -Wold-style-definition -Wpointer-arith -Wsign-compare
> -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-packed-not-aligned
> -Wno-missing-field-initializers -D_GNU_SOURCE -fPIC
> -march=armv8.2-a+crc+crypto+lse -DALLOW_EXPERIMENTAL_API
> -DALLOW_INTERNAL_API -Wno-format-truncation -Wdisabled-optimization
> -Waggregate-return -Wbad-function-cast -Wno-sign-compare
> -Wno-unused-parameter -Wno-unused-variable -Wno-empty-body
> -Wno-unused-but-set-variable -MD -MQ
> 'drivers/common/sfc_efx/base/932d09a@@sfc_base@sta/efx_crc32.c.o' -MF
> 'drivers/common/sfc_efx/base/932d09a@@sfc_base@sta/efx_crc32.c.o.d' -o
> 'drivers/common/sfc_efx/base/932d09a@@sfc_base@sta/efx_crc32.c.o' -c
> ../../dpdk/drivers/common/sfc_efx/base/efx_crc32.c
> In file included from ../../dpdk/lib/librte_eal/arm/include/rte_atomic.h:9,
>                  from ../../dpdk/lib/librte_eal/include/generic/rte_pause.h:19,
>                  from ../../dpdk/lib/librte_eal/arm/include/rte_pause_64.h:19,
>                  from ../../dpdk/lib/librte_eal/arm/include/rte_pause.h:13,
>                  from
> ../../dpdk/lib/librte_eal/include/generic/rte_spinlock.h:25,
>                  from ../../dpdk/lib/librte_eal/arm/include/rte_spinlock.h:17,
>                  from ../../dpdk/drivers/common/sfc_efx/efsys.h:15,
>                  from ../../dpdk/drivers/common/sfc_efx/base/efx.h:11,
>                  from ../../dpdk/drivers/common/sfc_efx/base/efx_crc32.c:7:
> ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h: In function
> ‘__cas_128_relaxed’:
> ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h:81:20: error:
> function returns an aggregate [-Werror=aggregate-return]
>  __ATOMIC128_CAS_OP(__cas_128_relaxed, "casp")
>                     ^~~~~~~~~~~~~~~~~
> ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h:57:1: note: in
> definition of macro ‘__ATOMIC128_CAS_OP’
>  cas_op_name(rte_int128_t *dst, rte_int128_t old, rte_int128_t updated)      \
>  ^~~~~~~~~~~
> ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h: In function
> ‘__cas_128_acquire’:
> ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h:82:20: error:
> function returns an aggregate [-Werror=aggregate-return]
>  __ATOMIC128_CAS_OP(__cas_128_acquire, "caspa")
>                     ^~~~~~~~~~~~~~~~~
> ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h:57:1: note: in
> definition of macro ‘__ATOMIC128_CAS_OP’
>  cas_op_name(rte_int128_t *dst, rte_int128_t old, rte_int128_t updated)      \
>  ^~~~~~~~~~~
> ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h: In function
> ‘__cas_128_release’:
> ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h:83:20: error:
> function returns an aggregate [-Werror=aggregate-return]
>  __ATOMIC128_CAS_OP(__cas_128_release, "caspl")
>                     ^~~~~~~~~~~~~~~~~
> ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h:57:1: note: in
> definition of macro ‘__ATOMIC128_CAS_OP’
>  cas_op_name(rte_int128_t *dst, rte_int128_t old, rte_int128_t updated)      \
>  ^~~~~~~~~~~
> ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h: In function
> ‘__cas_128_acq_rel’:
> ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h:84:20: error:
> function returns an aggregate [-Werror=aggregate-return]
>  __ATOMIC128_CAS_OP(__cas_128_acq_rel, "caspal")
>                     ^~~~~~~~~~~~~~~~~
> ../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h:57:1: note: in
> definition of macro ‘__ATOMIC128_CAS_OP’
>  cas_op_name(rte_int128_t *dst, rte_int128_t old, rte_int128_t updated)      \
>  ^~~~~~~~~~~
> cc1: all warnings being treated as errors
>
>
> If I waive those warnings:
> - next to fail is net/igc (fixed by next patch so ok)
> - and then next to fail is net/sfc.

Regarding the net/sfc build, Could try clean build.(I got the warning first,
after the clean build, it is OK)



>
>
> --
> David Marchand
>

  reply	other threads:[~2020-11-27  9:34 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-27  8:09 [dpdk-dev] [PATCH 0/2] gcc build fix Ruifeng Wang
2020-11-27  8:09 ` [dpdk-dev] [PATCH 1/2] eal/arm: fix gcc build for optimization level 0 Ruifeng Wang
2020-11-27  8:39   ` David Marchand
2020-11-27  8:51     ` Jerin Jacob
2020-11-27  9:25       ` David Marchand
2020-11-27  9:33         ` Jerin Jacob [this message]
2020-11-27  9:45           ` David Marchand
2020-11-27 10:05             ` Ruifeng Wang
2020-11-27 10:28               ` Jerin Jacob
2020-11-27  9:39         ` Andrew Rybchenko
2020-11-27  9:36     ` Ruifeng Wang
2020-11-27  8:09 ` [dpdk-dev] [PATCH 2/2] net/igc: " Ruifeng Wang
2020-11-27  8:53   ` Jerin Jacob
2020-11-27  9:02   ` David Marchand
2020-11-27 12:13     ` David Marchand
2020-11-27 14:50       ` Wang, Haiyue
2020-11-27 10:15 ` [dpdk-dev] [PATCH v2 0/2] gcc build fix Ruifeng Wang
2020-11-27 10:15   ` [dpdk-dev] [PATCH v2 1/2] eal/arm: fix gcc build for optimization level 0 Ruifeng Wang
2020-11-27 13:03     ` Ruifeng Wang
2020-11-27 10:15   ` [dpdk-dev] [PATCH v2 2/2] net/igc: " Ruifeng Wang
2020-11-27 13:35   ` [dpdk-dev] [PATCH v2 0/2] gcc build fix Thomas Monjalon
2020-11-27 14:08     ` Ruifeng Wang
2020-11-27 16:03 ` [dpdk-dev] [PATCH " 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=CALBAE1MxYnsMbAaFeyhZp5tEv1PkvE-4+LYZ_KZniEueEuGPuQ@mail.gmail.com \
    --to=jerinjacobk@gmail.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=feifei.wang2@arm.com \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=jerinj@marvell.com \
    --cc=nd@arm.com \
    --cc=ruifeng.wang@arm.com \
    /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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git