Fix: build failure with -fno-common
authorMichael Jeanson <mjeanson@efficios.com>
Thu, 16 Jan 2020 19:34:47 +0000 (14:34 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 17 Jan 2020 18:57:23 +0000 (13:57 -0500)
commit44cdb3a261262ebabea3fb0cae9360ac05e66f2c
tree06968227f03ece11c965afd5589626d3c0a08ae9
parentfa1289fc106deb2f88249e1ebdcf87d9b493b2a6
Fix: build failure with -fno-common

GCC 10 will default to building with -fno-common, this inhibits the
linker from merging multiple tentative definitions of a symbol in an
archive.

I'm not sure I understand what happen with the symbols in mi-lttng.h
but a similar issue was adressed in:

  commit 4965f956f3ef47388fb4a1b2f8f504abfe31afe7
  Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
  Date:   Fri May 22 12:53:30 2015 -0400

    Fix: Mark MI and Config string declarations as extern

    This fixes a build issue with GCC 5.1 which would complain about
    these symbols being defined multiple times.

Make sure these symbols are extern and defined only in one compile unit.

For more information, see:
https://gcc.gnu.org/gcc-10/porting_to.html

Change-Id: I139c9695371836cb1011f9ce192080b602ed2fbc
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-consumerd/lttng-consumerd.h
src/bin/lttng-sessiond/ust-app.c
src/bin/lttng-sessiond/ust-app.h
src/common/mi-lttng.h
tests/regression/tools/live/live_test.c
tests/unit/test_kernel_data.c
tests/unit/test_session.c
tests/unit/test_ust_data.c
This page took 0.025302 seconds and 4 git commands to generate.