mbox series

[0/3] examples: fix building with GCC 10

Message ID cover.1580910264.git.tredaelli@redhat.com (mailing list archive)
Headers
Series examples: fix building with GCC 10 |

Message

Timothy Redaelli Feb. 5, 2020, 1:47 p.m. UTC
  GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

See https://gcc.gnu.org/gcc-10/porting_to.html for more informations.

I didn't put -fcommon to CFLAGS since:
  Compiling with -fno-common is useful on targets for which it provides
  better performance, or if you wish to verify that the program will work
  on other systems that always treat uninitialized variable definitions
  this way.
from gcc man page

Timothy Redaelli (3):
  examples/vhost_blk: fix building with GCC 10
  examples/eventdev_pipeline: fix building with GCC 10
  examples/qos_sched: fix building with GCC 10

 examples/eventdev_pipeline/main.c            | 2 ++
 examples/eventdev_pipeline/pipeline_common.h | 4 ++--
 examples/qos_sched/cfg_file.c                | 3 +++
 examples/qos_sched/main.h                    | 4 ++--
 examples/vhost_blk/vhost_blk.c               | 2 ++
 examples/vhost_blk/vhost_blk.h               | 4 ++--
 6 files changed, 13 insertions(+), 6 deletions(-)
  

Comments

David Marchand March 4, 2020, 9:37 a.m. UTC | #1
On Wed, Feb 5, 2020 at 2:47 PM Timothy Redaelli <tredaelli@redhat.com> wrote:
>
> GCC 10 defaults to -fno-common, this means a linker error will now be
> reported if the same global variable is defined in more than one
> compilation unit.
>
> See https://gcc.gnu.org/gcc-10/porting_to.html for more informations.
>
> I didn't put -fcommon to CFLAGS since:
>   Compiling with -fno-common is useful on targets for which it provides
>   better performance, or if you wish to verify that the program will work
>   on other systems that always treat uninitialized variable definitions
>   this way.
> from gcc man page

For the series,
Acked-by: David Marchand <david.marchand@redhat.com>
  
David Marchand March 4, 2020, 10:17 a.m. UTC | #2
On Wed, Mar 4, 2020 at 10:37 AM David Marchand
<david.marchand@redhat.com> wrote:
>
> On Wed, Feb 5, 2020 at 2:47 PM Timothy Redaelli <tredaelli@redhat.com> wrote:
> >
> > GCC 10 defaults to -fno-common, this means a linker error will now be
> > reported if the same global variable is defined in more than one
> > compilation unit.
> >
> > See https://gcc.gnu.org/gcc-10/porting_to.html for more informations.
> >
> > I didn't put -fcommon to CFLAGS since:
> >   Compiling with -fno-common is useful on targets for which it provides
> >   better performance, or if you wish to verify that the program will work
> >   on other systems that always treat uninitialized variable definitions
> >   this way.
> > from gcc man page
>
> For the series,
> Acked-by: David Marchand <david.marchand@redhat.com>

Series applied, thanks.