mbox series

[0/3] mlx: fix build with -fno-common (gcc 10)

Message ID 20200210103216.1168439-1-thomas@monjalon.net (mailing list archive)
Headers
Series mlx: fix build with -fno-common (gcc 10) |

Message

Thomas Monjalon Feb. 10, 2020, 10:32 a.m. UTC
  In GCC 10, -fno-common will be the default.
There are 2 ways of solving issues:
  - add -fcommon
  - stop allocating variables in .h files

In this patchset, the variables are declared extern,
because it is cleaner anyway.


Thomas Monjalon (3):
  common/mlx5: split glue initialization
  common/mlx5: fix build with -fno-common
  net/mlx4: fix build with -fno-common

 drivers/common/mlx5/mlx5_common.c | 80 +++++++++++++++++++------------
 drivers/common/mlx5/mlx5_glue.h   |  2 +-
 drivers/net/mlx4/mlx4.c           |  4 ++
 drivers/net/mlx4/mlx4_glue.h      |  2 +-
 drivers/net/mlx4/mlx4_rxtx.h      |  2 +-
 5 files changed, 57 insertions(+), 33 deletions(-)
  

Comments

Matan Azrad March 17, 2020, 8:34 a.m. UTC | #1
From:  Thomas Monjalon
> In GCC 10, -fno-common will be the default.
> There are 2 ways of solving issues:
>   - add -fcommon
>   - stop allocating variables in .h files
> 
> In this patchset, the variables are declared extern, because it is cleaner
> anyway.
> 
> 

Series-acked-by: Matan Azrad <matan@mellanox.com>
> Thomas Monjalon (3):
>   common/mlx5: split glue initialization
>   common/mlx5: fix build with -fno-common
>   net/mlx4: fix build with -fno-common
> 
>  drivers/common/mlx5/mlx5_common.c | 80 +++++++++++++++++++--------
> ----
>  drivers/common/mlx5/mlx5_glue.h   |  2 +-
>  drivers/net/mlx4/mlx4.c           |  4 ++
>  drivers/net/mlx4/mlx4_glue.h      |  2 +-
>  drivers/net/mlx4/mlx4_rxtx.h      |  2 +-
>  5 files changed, 57 insertions(+), 33 deletions(-)
> 
> --
> 2.25.0
  
Thomas Monjalon April 7, 2020, 12:19 a.m. UTC | #2
17/03/2020 09:34, Matan Azrad:
>  From:  Thomas Monjalon
> > In GCC 10, -fno-common will be the default.
> > There are 2 ways of solving issues:
> >   - add -fcommon
> >   - stop allocating variables in .h files
> > 
> > In this patchset, the variables are declared extern, because it is cleaner
> > anyway.
> 
> Series-acked-by: Matan Azrad <matan@mellanox.com>
> 
> > Thomas Monjalon (3):
> >   common/mlx5: split glue initialization
> >   common/mlx5: fix build with -fno-common
> >   net/mlx4: fix build with -fno-common

It seems these patches are also fixing usage of glue dlopen
with PMD as shared library.
We should add Cc: stable@dpdk.org and identify a root cause.