build: only link rt where needed
Only libraries that are using shm_open require linking rt when creating the shared library. Stop including it on every library and just add it to LOCAL_SYS_LIBS in the one case where it is used (spdk_trace). Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Ic13128873a76c355b14871a0dea0922488c9cd13 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4370 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
ed071dd9f9
commit
9ae6f5893b
@ -39,6 +39,7 @@ SO_MINOR := 0
|
||||
|
||||
C_SRCS = trace.c trace_flags.c trace_rpc.c
|
||||
LIBNAME = trace
|
||||
LOCAL_SYS_LIBS = -lrt
|
||||
|
||||
SPDK_MAP_FILE = $(abspath $(CURDIR)/spdk_trace.map)
|
||||
|
||||
|
@ -60,9 +60,7 @@ DEP := $(LIB)
|
||||
endif
|
||||
|
||||
ifeq ($(OS),FreeBSD)
|
||||
LOCAL_SYS_LIBS += -L/usr/local/lib -lrt
|
||||
else
|
||||
LOCAL_SYS_LIBS += -lrt
|
||||
LOCAL_SYS_LIBS += -L/usr/local/lib
|
||||
endif
|
||||
|
||||
define subdirs_rule
|
||||
|
Loading…
Reference in New Issue
Block a user