[dpdk-dev] [PATCH 2/2] net/igc: fix gcc build for optimization level 0

Jerin Jacob jerinjacobk at gmail.com
Fri Nov 27 09:53:19 CET 2020


On Fri, Nov 27, 2020 at 1:40 PM Ruifeng Wang <ruifeng.wang at arm.com> wrote:
>
> Gcc build with '-O0' failed for:
>  ../drivers/net/igc/base/igc_api.c
>  Assembler messages:
> 29: Error: selected processor does not support `casp x0,x1,x2,x3,[x4]'
> 82: Error: selected processor does not support `caspa x0,x1,x2,x3,[x4]'
> 135: Error: selected processor does not support `caspl x0,x1,x2,x3,[x4]'
> 188: Error: selected processor does not support `caspal x0,x1,x2,x3,[x4]'
>
> This is due to c_args not been passed to meson.
>
> Fixes: 8cb7c57d9b3c ("net/igc: support device initialization")
> Cc: alvinx.zhang at intel.com
>
> Reported-by: Feifei Wang <feifei.wang2 at arm.com>
> Signed-off-by: Ruifeng Wang <ruifeng.wang at arm.com>


Able to reproduce the issue with meson  build -Dbuildtype=debug
--cross-file config/arm/arm64_octeontx2_linux_gcc and
verified the build issue.

Tested-by: Jerin Jacob <jerinj at marvell.com>


> ---
>  drivers/net/igc/base/meson.build | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/igc/base/meson.build b/drivers/net/igc/base/meson.build
> index 299985180..690704fe0 100644
> --- a/drivers/net/igc/base/meson.build
> +++ b/drivers/net/igc/base/meson.build
> @@ -13,6 +13,7 @@ sources = [
>  ]
>
>  base_lib = static_library('igc_base', sources,
> -       dependencies: static_rte_eal)
> +       dependencies: static_rte_eal,
> +       c_args: cflags)
>
>  base_objs = base_lib.extract_all_objects()
> --
> 2.20.1
>


More information about the dev mailing list