usdt: don't emit probes in unit tests
There is no point in producing USDT probes in unit tests and it breaks the build on some systems: ctrlr_discovery_ut.o(.note.stapsdt+0x14): error: relocation refers to local symbol "" [102], which is defined in a discarded section ctrlr_discovery_ut.o(.note.stapsdt+0x90): error: relocation refers to local symbol "" [108], which is defined in a discarded section ctrlr_discovery_ut.o(.note.stapsdt+0xf8): error: relocation refers to local symbol "" [110], which is defined in a discarded section ctrlr_discovery_ut.o(.note.stapsdt+0x15c): error: relocation refers to local symbol "" [112], which is defined in a discarded section Fixes issue #2027. Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: Ic6dad60df1f7dccb7f99777ebc4435c618cb505a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8699 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by: Karol Latecki <karol.latecki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
03ac99d13f
commit
4ee3f1bccf
@ -37,7 +37,7 @@
|
||||
#include "spdk/config.h"
|
||||
#include "spdk/env.h"
|
||||
|
||||
#ifdef SPDK_CONFIG_USDT
|
||||
#if defined(SPDK_CONFIG_USDT) && !defined(SPDK_UNIT_TEST)
|
||||
|
||||
#include <sys/sdt.h>
|
||||
|
||||
|
@ -50,6 +50,7 @@ CFLAGS += -I$(SPDK_ROOT_DIR)/lib
|
||||
CFLAGS += -I$(SPDK_ROOT_DIR)/module
|
||||
CFLAGS += -I$(SPDK_ROOT_DIR)/test
|
||||
CFLAGS += -ffunction-sections
|
||||
CFLAGS += -DSPDK_UNIT_TEST=1
|
||||
LDFLAGS += -Wl,--gc-sections
|
||||
|
||||
SPDK_LIB_LIST += thread util log trace
|
||||
|
Loading…
Reference in New Issue
Block a user