diff --git a/iscsi-scst/Makefile b/iscsi-scst/Makefile index 6e992e603..e596eaba5 100644 --- a/iscsi-scst/Makefile +++ b/iscsi-scst/Makefile @@ -99,8 +99,20 @@ else endif endif -# Use make instead of $(MAKE) to get rid of command-line option -i -run_conftest = $(shell if [ "0$(V)" -gt 0 ]; then output=/dev/stdout; else output=/dev/null; fi; if MAKEFLAGS= make -C $(KDIR) V=$(V) M="$(shell pwd)/conftest/$1" PRE_CFLAGS="-Werror $(OFED_CFLAGS)" $(OFED_CONFIG) KBUILD_EXTRA_SYMBOLS="$(OFED_MODULE_SYMVERS)" 1>&2 2>$${output}; then echo "$(strip $2)"; else echo "$(strip $3)"; fi) +# Use make instead of $(MAKE) to get rid of command-line option -i. Enable +# -Wno-deprecated-declarations for the RHEL 7.x kernels. +run_conftest = $(shell \ + export KCFLAGS="-Wno-deprecated-declarations"; \ + if [ "0$(V)" -gt 0 ]; then \ + output=/dev/stdout; \ + else \ + output=conftest/$1/build-output-$(KVER).txt; \ + fi; \ + if MAKEFLAGS= make -C $(KDIR) V=$(V) M="$(shell pwd)/conftest/$1" PRE_CFLAGS="-Werror $(OFED_CFLAGS)" $(OFED_CONFIG) KBUILD_EXTRA_SYMBOLS="$(OFED_MODULE_SYMVERS)" 1>&2 2>$${output}; then \ + echo "$(strip $2)"; \ + else \ + echo "$(strip $3)"; \ + fi) run_conftest_bool = $(call run_conftest,$1,-D$(strip $2)=1,-D$(strip $2)=0) CONFTESTS = $(shell ls -d conftest/*) diff --git a/srpt/Makefile b/srpt/Makefile index 67354b571..7876ecb9a 100644 --- a/srpt/Makefile +++ b/srpt/Makefile @@ -76,8 +76,20 @@ endif OFED_MODULE_SYMVERS:=$(OFED_KERNEL_DIR)/Module.symvers endif -# Use make instead of $(MAKE) to get rid of command-line option -i -run_conftest = $(shell if [ "0$(V)" -gt 0 ]; then output=/dev/stdout; else output=/dev/null; fi; if MAKEFLAGS= make -C $(KDIR) V=$(V) M="$(shell pwd)/conftest/$1" PRE_CFLAGS="-Werror $(OFED_CFLAGS)" $(OFED_CONFIG) KBUILD_EXTRA_SYMBOLS="$(OFED_MODULE_SYMVERS)" 1>&2 2>$${output}; then echo "$(strip $2)"; else echo "$(strip $3)"; fi) +# Use make instead of $(MAKE) to get rid of command-line option -i. Enable +# -Wno-deprecated-declarations for the RHEL 7.x kernels. +run_conftest = $(shell \ + export KCFLAGS="-Wno-deprecated-declarations"; \ + if [ "0$(V)" -gt 0 ]; then \ + output=/dev/stdout; \ + else \ + output=conftest/$1/build-output-$(KVER).txt; \ + fi; \ + if MAKEFLAGS= make -C $(KDIR) V=$(V) M="$(shell pwd)/conftest/$1" PRE_CFLAGS="-Werror $(OFED_CFLAGS)" $(OFED_CONFIG) KBUILD_EXTRA_SYMBOLS="$(OFED_MODULE_SYMVERS)" 1>&2 2>$${output}; then \ + echo "$(strip $2)"; \ + else \ + echo "$(strip $3)"; \ + fi) run_conftest_bool = $(call run_conftest,$1,-D$(strip $2)=1,-D$(strip $2)=0) CONFTESTS = $(shell ls -d conftest/*)