Commit 1c96c421 authored by Jonathan Richardson's avatar Jonathan Richardson Committed by Jim Harris
Browse files

build: Don't pass -fuse-ld to compiler if LD_TYPE not set



Don't assume detection of LD by the detect_cc script suceeded. If it
wasn't detected then LD_TYPE won't be set and the gcc command line
option shouldn't be set either. Compilation will fail if -fuse-ld is
specified with no value.

Change-Id: If4a0ede8cdc5a71cf92de2beb0f24e4650f58f3a
Signed-off-by: default avatarJonathan Richardson <jonathan.richardson@broadcom.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447376


Reviewed-by: default avatarScott Branden <sbranden@gmail.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 62266a72
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -126,7 +126,9 @@ LDFLAGS += -Wl,-z,relro,-z,now
LDFLAGS += -Wl,-z,noexecstack

# Specify the linker to use
ifneq ($(LD_TYPE),)
LDFLAGS += -fuse-ld=$(LD_TYPE)
endif

ifeq ($(OS),FreeBSD)
SYS_LIBS += -L/usr/local/lib