From 54700c7e6938f7ed41c271548b61d277a5a14c44 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Mon, 12 Feb 2018 08:53:33 -0700 Subject: [PATCH] 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: Jim Harris Change-Id: I4e0a1d01e72b1ee0f67e46ad224c02863c7b0d74 Reviewed-on: https://review.gerrithub.io/399432 Reviewed-by: Lance Hartmann Tested-by: SPDK Automated Test System Reviewed-by: Daniel Verkamp --- Makefile | 8 +++++++- autobuild.sh | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 891349b5a..e7d2d547e 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/autobuild.sh b/autobuild.sh index 8d8e7a68a..168bb482f 100755 --- a/autobuild.sh +++ b/autobuild.sh @@ -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