iscsi-scst, srpt: Improve run_conftest

Add -Wno-deprecated-declarations to the compiler flags for RHEL and CentOS.
Save the output of the build process such that it can be inspected easily.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9037 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2020-07-05 02:06:21 +00:00
parent 2650ab25f9
commit 212fd12cba
2 changed files with 28 additions and 4 deletions

View File

@@ -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/*)

View File

@@ -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/*)