Commit 54700c7e authored by Jim Harris's avatar Jim Harris
Browse files

build: add top-level cc_version and cxx_version Makefile targets



Also 'build' these targets in autobuild.sh - this will print out
the compiler versions to the build log.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I4e0a1d01e72b1ee0f67e46ad224c02863c7b0d74

Reviewed-on: https://review.gerrithub.io/399432


Reviewed-by: default avatarLance Hartmann <lance.hartmann@oracle.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 88beac70
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk

DIRS-y += lib test examples app include

.PHONY: all clean $(DIRS-y) config.h CONFIG.local mk/cc.mk
.PHONY: all clean $(DIRS-y) config.h CONFIG.local mk/cc.mk cc_version cxx_version

ifeq ($(CURDIR)/dpdk/build,$(CONFIG_DPDK_DIR))
ifneq ($(SKIP_DPDK_BUILD),1)
@@ -76,4 +76,10 @@ config.h: CONFIG CONFIG.local scripts/genconfig.py
	cmp -s $@.tmp $@ || mv $@.tmp $@ ; \
	rm -f $@.tmp

cc_version: mk/cc.mk
	$(Q)echo "SPDK using CC=$(CC)"; $(CC) -v

cxx_version: mk/cc.mk
	$(Q)echo "SPDK using CXX=$(CXX)"; $(CXX) -v

include $(SPDK_ROOT_DIR)/mk/spdk.subdirs.mk
+4 −0
Original line number Diff line number Diff line
@@ -30,6 +30,10 @@ if [ $SPDK_BUILD_IOAT_KMOD -eq 1 ]; then
fi
timing_exit build_kmod

# Print compiler versions to log
$MAKE cc_version
$MAKE cxx_version

scanbuild=''
make_timing_label='make'
if [ $SPDK_RUN_SCANBUILD -eq 1 ] && hash scan-build; then