diff --git a/fcst/Makefile b/fcst/Makefile index ab7a71f4d..3b61baa1a 100644 --- a/fcst/Makefile +++ b/fcst/Makefile @@ -60,11 +60,13 @@ INSTALL_DIR := $(INSTALL_MOD_PATH)/lib/modules/$(KVER)/extra SCST_DIR := $(shell echo "$$PWD")/../scst/src all: - $(MAKE) -C $(KDIR) M=$(shell pwd) + $(MAKE) -C $(KDIR) M=$(shell pwd) \ + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") install: all KDIR=$(KDIR) ../scripts/sign-modules $(MAKE) -C $(KDIR) M=$(shell pwd) \ + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") \ $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ CONFIG_MODULE_SIG_ALL= modules_install diff --git a/iscsi-scst/Makefile b/iscsi-scst/Makefile index 7ac41c95d..6f9057389 100644 --- a/iscsi-scst/Makefile +++ b/iscsi-scst/Makefile @@ -110,7 +110,12 @@ run_conftest = $(shell \ else \ output=conftest/$1/build-output-$(KVER).txt; \ fi; \ - if MAKEFLAGS= make -C $(KDIR) V=$(V) M="$(shell pwd)/conftest/$1" CONFTEST_CFLAGS="-Werror $(OFED_CFLAGS)" $(OFED_CONFIG) KBUILD_EXTRA_SYMBOLS="$(OFED_MODULE_SYMVERS)" 1>&2 2>$${output}; then \ + if MAKEFLAGS= make -C $(KDIR) V=$(V) \ + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") \ + M="$(shell pwd)/conftest/$1" \ + CONFTEST_CFLAGS="-Werror $(OFED_CFLAGS)" $(OFED_CONFIG) \ + KBUILD_EXTRA_SYMBOLS="$(OFED_MODULE_SYMVERS)" \ + 1>&2 2>$${output}; then \ echo "$(strip $2)"; \ else \ echo "$(strip $3)"; \ @@ -132,11 +137,13 @@ ISER_CFLAGS = $(OFED_CFLAGS) -DOFED_FLAVOR=$(OFED_FLAVOR) $(CONFTEST_CFLAGS) mods: include/iscsi_scst_itf_ver.h $(CONFTEST_OUTPUTS) $(MAKE) -C $(KDIR) M=$(KMOD) CONFTEST_CFLAGS="$(CONFTEST_CFLAGS)"\ + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") \ modules echo "$@: INFINIBAND_ENABLED = $(INFINIBAND_ENABLED)" if $(INFINIBAND_ENABLED); then \ echo " Building against $(OFED_FLAVOR) RDMA kernel headers.";\ $(MAKE) -C $(KDIR) M=$(ISERTMOD) ISER_CFLAGS="$(ISER_CFLAGS)" \ + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") \ $(OFED_CONFIG) modules; \ fi @@ -158,12 +165,14 @@ install: all @install -vD -m 644 doc/manpages/iscsi-scst-adm.8 $(DESTDIR)$(MANDIR)/man8/iscsi-scst-adm.8 (cd $(KMOD) && KDIR=$(KDIR) ../../scripts/sign-modules) $(MAKE) -C $(KDIR) M=$(KMOD) \ + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") \ $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ CONFIG_MODULE_SIG_ALL= modules_install echo "$@: INFINIBAND_ENABLED = $(INFINIBAND_ENABLED)" if $(INFINIBAND_ENABLED); then \ (cd $(ISERTMOD) && KDIR=$(KDIR) ../../../scripts/sign-modules);\ $(MAKE) -C $(KDIR) M=$(ISERTMOD) \ + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") \ $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ CONFIG_MODULE_SIG_ALL= modules_install; \ fi diff --git a/iscsi-scst/kernel/conn.c b/iscsi-scst/kernel/conn.c index 640da52e7..a0bc04379 100644 --- a/iscsi-scst/kernel/conn.c +++ b/iscsi-scst/kernel/conn.c @@ -138,6 +138,7 @@ static ssize_t iscsi_get_target_ip(struct iscsi_conn *conn, "%pI4", &inet_sk(sk)->inet_saddr); #endif break; +#ifdef CONFIG_IPV6 case AF_INET6: #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) pos = scnprintf(buf, size, @@ -151,6 +152,7 @@ static ssize_t iscsi_get_target_ip(struct iscsi_conn *conn, #endif #endif break; +#endif default: pos = scnprintf(buf, size, "Unknown family %d", sk->sk_family); diff --git a/iscsi-scst/kernel/isert-scst/Kbuild b/iscsi-scst/kernel/isert-scst/Kbuild index 932a6bf87..2bfe301bf 100644 --- a/iscsi-scst/kernel/isert-scst/Kbuild +++ b/iscsi-scst/kernel/isert-scst/Kbuild @@ -15,9 +15,13 @@ # GNU General Public License for more details. LINUXINCLUDE := $(ISER_CFLAGS) $(LINUXINCLUDE) -KBUILD_EXTRA_SYMBOLS=$(src)/../../kernel/Module.symvers \ - $(shell for d in /usr/src/ofa_kernel/default/Module.symvers; do\ - [ -e $$d ] || continue; echo $$d; break; done) +ifdef CONFIG_CC_IS_CLANG +KBUILD_EXTRA_SYMBOLS+=$(src)/../../../scst/src/Module.symvers +endif +KBUILD_EXTRA_SYMBOLS+= \ + $(src)/../../kernel/Module.symvers \ + $(shell for d in /usr/src/ofa_kernel/default/Module.symvers; do \ + [ -e $$d ] || continue; echo $$d; break; done) ccflags-y += -I$(src)/../../../scst/include ccflags-y += -I$(src)/../../include diff --git a/iscsi-scst/kernel/isert-scst/iser_rdma.c b/iscsi-scst/kernel/isert-scst/iser_rdma.c index 7f4d60fa0..d4ac072bf 100644 --- a/iscsi-scst/kernel/isert-scst/iser_rdma.c +++ b/iscsi-scst/kernel/isert-scst/iser_rdma.c @@ -1302,7 +1302,10 @@ static struct isert_connection *isert_conn_create(struct rdma_cm_id *cm_id, isert_conn->max_sge = isert_dev->device_attr.max_recv_sge - 3; #endif - WARN_ON(isert_conn->max_sge < 1); + if (WARN_ON(isert_conn->max_sge < 1)) { + err = -ENODEV; + goto fail_login_req_pdu; + } INIT_LIST_HEAD(&isert_conn->rx_buf_list); INIT_LIST_HEAD(&isert_conn->tx_free_list); diff --git a/nightly/conf/nightly.conf b/nightly/conf/nightly.conf index 4f55a8dda..3c0889a8c 100644 --- a/nightly/conf/nightly.conf +++ b/nightly/conf/nightly.conf @@ -3,31 +3,31 @@ ABT_DETAILS="x86_64" ABT_JOBS=5 ABT_KERNELS=" \ -5.7.10 \ +5.7.12 \ 5.6.19-nc \ 5.5.19-nc \ -5.4.53-nc \ +5.4.55-nc \ 5.3.18-nc \ 5.2.21-nc \ 5.1.21-nc \ 5.0.21-nc \ 4.20.17-nc \ -4.19.134-nc \ +4.19.136-nc \ 4.18.20-nc \ 4.17.19-nc \ 4.16.18-nc \ 4.15.18-nc \ -4.14.189-nc \ +4.14.191-nc \ 4.13.16-nc \ 4.12.14-nc \ 4.11.12-nc \ 4.10.17-nc \ -4.9.231-nc \ +4.9.232-nc \ 4.8.17-nc \ 4.7.10-nc \ 4.6.7-nc \ 4.5.7-nc \ -4.4.231-nc \ +4.4.232-nc \ 4.3.6-nc \ 4.2.8-nc \ 4.1.52-nc \ @@ -61,7 +61,7 @@ ABT_KERNELS=" \ 2.6.33.7-nc \ 2.6.32.27-nc \ 2.6.31.14-nc \ -4.18.0-193.6.3.el8_2^CentOS^8.2.2004-nc \ +4.18.0-193.14.2.el8_2^CentOS^8.2.2004-nc \ 4.18.0-147.8.1.el8_1^CentOS^8.1.1911-nc \ 4.18.0-80.11.2.el8_0^CentOS^8.0.1905-nc \ 3.10.0-1127.el7^CentOS^7.8.2003-nc \ diff --git a/qla2x00t-32gbit/Makefile b/qla2x00t-32gbit/Makefile index dd4f889cc..3d06d5127 100644 --- a/qla2x00t-32gbit/Makefile +++ b/qla2x00t-32gbit/Makefile @@ -48,13 +48,15 @@ INSTALL_DIR := $(INSTALL_MOD_PATH)/lib/modules/$(KVER)/extra all: $(MAKE) -C $(KDIR) M=$(shell pwd) \ - $(CONFIG_SCSI_QLA2XXX_TARGET)=CONFIG_SCSI_QLA2XXX_TARGET + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") \ + $(CONFIG_SCSI_QLA2XXX_TARGET)=CONFIG_SCSI_QLA2XXX_TARGET install: all KDIR=$(KDIR) ../scripts/sign-modules $(MAKE) -C $(KDIR) M=$(shell pwd) \ - $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ - CONFIG_MODULE_SIG_ALL= modules_install + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") \ + $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ + CONFIG_MODULE_SIG_ALL= modules_install uninstall: rm -f $(INSTALL_DIR)/qla2xxx_scst.ko diff --git a/qla2x00t-32gbit/qla2x00-target/Makefile b/qla2x00t-32gbit/qla2x00-target/Makefile index e541e9da3..c6115878b 100644 --- a/qla2x00t-32gbit/qla2x00-target/Makefile +++ b/qla2x00t-32gbit/qla2x00-target/Makefile @@ -67,7 +67,8 @@ INSTALL_DIR := $(INSTALL_MOD_PATH)/lib/modules/$(KVER)/extra SCST_DIR := $(shell echo "$$PWD/../../scst/src") all: $(QLA2XXX_SCST) - $(MAKE) -C $(KDIR) M=$(shell pwd) + $(MAKE) -C $(KDIR) M=$(shell pwd) \ + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") install: all ifneq ($(BUILD_2X_MODULE),) @@ -75,6 +76,7 @@ ifneq ($(BUILD_2X_MODULE),) endif KDIR=$(KDIR) ../../scripts/sign-modules $(MAKE) -C $(KDIR) M=$(shell pwd) \ + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") \ $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ CONFIG_MODULE_SIG_ALL= modules_install diff --git a/qla2x00t-32gbit/qla_mr.c b/qla2x00t-32gbit/qla_mr.c index db1f660d4..e2d854fdb 100644 --- a/qla2x00t-32gbit/qla_mr.c +++ b/qla2x00t-32gbit/qla_mr.c @@ -3286,8 +3286,8 @@ qlafx00_fxdisc_iocb(srb_t *sp, struct fxdisc_entry_fx00 *pfxiocb) fx_iocb.req_xfrcnt = cpu_to_le16(fxio->u.fxiocb.req_len); put_unaligned_le64(fxio->u.fxiocb.req_dma_handle, - &fx_iocb.dseg_rq.address); - fx_iocb.dseg_rq.length = + &fx_iocb.dseg_rq[0].address); + fx_iocb.dseg_rq[0].length = cpu_to_le32(fxio->u.fxiocb.req_len); } @@ -3296,8 +3296,8 @@ qlafx00_fxdisc_iocb(srb_t *sp, struct fxdisc_entry_fx00 *pfxiocb) fx_iocb.rsp_xfrcnt = cpu_to_le16(fxio->u.fxiocb.rsp_len); put_unaligned_le64(fxio->u.fxiocb.rsp_dma_handle, - &fx_iocb.dseg_rsp.address); - fx_iocb.dseg_rsp.length = + &fx_iocb.dseg_rsp[0].address); + fx_iocb.dseg_rsp[0].length = cpu_to_le32(fxio->u.fxiocb.rsp_len); } @@ -3334,7 +3334,7 @@ qlafx00_fxdisc_iocb(srb_t *sp, struct fxdisc_entry_fx00 *pfxiocb) cpu_to_le16(bsg_job->request_payload.sg_cnt); tot_dsds = bsg_job->request_payload.sg_cnt; - cur_dsd = &fx_iocb.dseg_rq; + cur_dsd = &fx_iocb.dseg_rq[0]; avail_dsds = 1; for_each_sg(bsg_job->request_payload.sg_list, sg, tot_dsds, index) { @@ -3389,7 +3389,7 @@ qlafx00_fxdisc_iocb(srb_t *sp, struct fxdisc_entry_fx00 *pfxiocb) fx_iocb.rsp_dsdcnt = cpu_to_le16(bsg_job->reply_payload.sg_cnt); tot_dsds = bsg_job->reply_payload.sg_cnt; - cur_dsd = &fx_iocb.dseg_rsp; + cur_dsd = &fx_iocb.dseg_rsp[0]; avail_dsds = 1; for_each_sg(bsg_job->reply_payload.sg_list, sg, diff --git a/qla2x00t-32gbit/qla_mr.h b/qla2x00t-32gbit/qla_mr.h index 762250891..968fc760a 100644 --- a/qla2x00t-32gbit/qla_mr.h +++ b/qla2x00t-32gbit/qla_mr.h @@ -177,8 +177,8 @@ struct fxdisc_entry_fx00 { uint8_t flags; uint8_t reserved_1; - struct dsd64 dseg_rq; - struct dsd64 dseg_rsp; + struct dsd64 dseg_rq[1]; + struct dsd64 dseg_rsp[1]; __le32 dataword; __le32 adapid; diff --git a/qla2x00t/Makefile b/qla2x00t/Makefile index ce1ba74c6..89103bff3 100644 --- a/qla2x00t/Makefile +++ b/qla2x00t/Makefile @@ -47,13 +47,15 @@ INSTALL_DIR := $(INSTALL_MOD_PATH)/lib/modules/$(KVER)/extra all: $(MAKE) -C $(KDIR) M=$(shell pwd) \ - $(CONFIG_SCSI_QLA2XXX_TARGET)=CONFIG_SCSI_QLA2XXX_TARGET + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") \ + $(CONFIG_SCSI_QLA2XXX_TARGET)=CONFIG_SCSI_QLA2XXX_TARGET install: all KDIR=$(KDIR) ../scripts/sign-modules $(MAKE) -C $(KDIR) M=$(shell pwd) BUILD_INI=m \ - $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ - CONFIG_MODULE_SIG_ALL= modules_install + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") \ + $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ + CONFIG_MODULE_SIG_ALL= modules_install uninstall: rm -f $(INSTALL_DIR)/qla2xxx_scst.ko diff --git a/qla2x00t/qla2x00-target/Makefile b/qla2x00t/qla2x00-target/Makefile index 89c239c25..f01b72d1f 100644 --- a/qla2x00t/qla2x00-target/Makefile +++ b/qla2x00t/qla2x00-target/Makefile @@ -66,7 +66,8 @@ INSTALL_DIR := $(INSTALL_MOD_PATH)/lib/modules/$(KVER)/extra SCST_DIR := $(shell echo "$$PWD/../../scst/src") all: $(QLA2XXX_SCST) - $(MAKE) -C $(KDIR) M=$(shell pwd) + $(MAKE) -C $(KDIR) M=$(shell pwd) \ + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") install: all ifneq ($(BUILD_2X_MODULE),) @@ -74,6 +75,7 @@ ifneq ($(BUILD_2X_MODULE),) endif KDIR=$(KDIR) ../../scripts/sign-modules $(MAKE) -C $(KDIR) M=$(shell pwd) \ + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") \ $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ CONFIG_MODULE_SIG_ALL= modules_install diff --git a/qla2x00t/qla_attr.c b/qla2x00t/qla_attr.c index e7cc73cc1..35ec12e6a 100644 --- a/qla2x00t/qla_attr.c +++ b/qla2x00t/qla_attr.c @@ -1754,7 +1754,7 @@ qla2x00_fw_state_show(struct device *dev, struct device_attribute *attr, { scsi_qla_host_t *vha = shost_priv(class_to_shost(dev)); int rval = QLA_FUNCTION_FAILED; - uint16_t state[5]; + uint16_t state[6]; if (qla2x00_reset_active(vha)) ql_log(ql_log_warn, vha, 0x707c, diff --git a/qla2x00t/qla_init.c b/qla2x00t/qla_init.c index 4e2b6f5a1..8b50a71fd 100644 --- a/qla2x00t/qla_init.c +++ b/qla2x00t/qla_init.c @@ -1922,7 +1922,7 @@ qla2x00_fw_ready(scsi_qla_host_t *vha) unsigned long wtime, mtime, cs84xx_time; uint16_t min_wait; /* Minimum wait time if loop is down */ uint16_t wait_time; /* Wait time if loop is coming ready */ - uint16_t state[5]; + uint16_t state[6]; struct qla_hw_data *ha = vha->hw; if (!qla_firmware_active(vha)) { diff --git a/scst/include/backport.h b/scst/include/backport.h index 208160a81..5c7b9cdec 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -2048,7 +2048,9 @@ fc_host_fpin_rcv(struct Scsi_Host *shost, u32 fpin_len, char *fpin_buf) /* */ /* See also commit a7dff3ad4787 ("scsi: fc: add FPIN ELS definition") # v5.2 */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0) && \ + (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 8 || \ + (RHEL_MAJOR -0 == 8 && RHEL_MINOR -0 < 2)) #define ELS_FPIN 0x16 #endif diff --git a/scst/src/Makefile b/scst/src/Makefile index d611cb71f..f07778186 100644 --- a/scst/src/Makefile +++ b/scst/src/Makefile @@ -71,12 +71,16 @@ $(SCST_INTF_VER_FILE): $(SCST_INC_DIR)/scst.h $(SCST_INC_DIR)/scst_const.h $(SCS echo "\"`sha1sum $(SCST_INC_DIR)/scst_user.h|awk '{printf $$1}'`\"" >>$(SCST_INTF_VER_FILE) all: $(SCST_INTF_VER_FILE) - $(MAKE) -C certs KDIR=$(KDIR) - $(MAKE) -C $(KDIR) M=$(shell pwd) - $(MAKE) -C $(KDIR) M=$(shell pwd)/dev_handlers + $(MAKE) -C certs KDIR=$(KDIR) \ + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") + $(MAKE) -C $(KDIR) M=$(shell pwd) \ + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") + $(MAKE) -C $(KDIR) M=$(shell pwd)/dev_handlers \ + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") scst: - $(MAKE) -C $(KDIR) M=$(shell pwd) + $(MAKE) -C $(KDIR) M=$(shell pwd) \ + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") install: all @if [ -z "$(DESTDIR)" ] && \ @@ -93,10 +97,12 @@ install: all /usr/sbin/weak-modules --remove-kernel; \ fi $(MAKE) -C $(KDIR) M=$(shell pwd)/dev_handlers \ + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") \ INSTALL_MOD_DIR=extra/dev_handlers \ $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ CONFIG_MODULE_SIG_ALL= modules_install $(MAKE) -C $(KDIR) M=$(shell pwd) \ + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") \ $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ CONFIG_MODULE_SIG_ALL= modules_install install -d $(INSTALL_DIR_H) diff --git a/scst/src/dev_handlers/Makefile b/scst/src/dev_handlers/Makefile index f6c2242ab..22b54de90 100644 --- a/scst/src/dev_handlers/Makefile +++ b/scst/src/dev_handlers/Makefile @@ -51,17 +51,20 @@ endif INSTALL_DIR := $(INSTALL_MOD_PATH)/lib/modules/$(KVER)/extra all: - $(MAKE) -C $(KDIR) M=$(shell pwd) + $(MAKE) -C $(KDIR) M=$(shell pwd) \ + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") %.lst: %.c - $(MAKE) -C $(KDIR) M=$(shell pwd) $@ + $(MAKE) -C $(KDIR) M=$(shell pwd) $@ \ + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") install: all mkdir -p $(DESTDIR)/var/lib/scst/vdev_mode_pages KDIR=$(KDIR) ../../../scripts/sign-modules $(MAKE) -C $(KDIR) M=$(shell pwd) \ - $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ - CONFIG_MODULE_SIG_ALL= modules_install + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") \ + $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ + CONFIG_MODULE_SIG_ALL= modules_install uninstall: rm -f $(INSTALL_DIR)/dev_handlers/scst_*.ko diff --git a/scst_local/Makefile b/scst_local/Makefile index 22273223a..24b2d2b29 100644 --- a/scst_local/Makefile +++ b/scst_local/Makefile @@ -34,13 +34,15 @@ INSTALL_DIR := $(INSTALL_MOD_PATH)/lib/modules/$(KVER)/extra SCST_DIR := $(shell echo "$$PWD")/../scst/src all: - $(MAKE) -C $(KDIR) M=$(shell pwd) + $(MAKE) -C $(KDIR) M=$(shell pwd) \ + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") install: all KDIR=$(KDIR) ../scripts/sign-modules $(MAKE) -C $(KDIR) M=$(shell pwd) \ - $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ - CONFIG_MODULE_SIG_ALL= modules_install + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") \ + $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ + CONFIG_MODULE_SIG_ALL= modules_install uninstall: rm -f $(INSTALL_DIR)/scst_local.ko diff --git a/srpt/Makefile b/srpt/Makefile index bdbea9df0..117bbca3b 100644 --- a/srpt/Makefile +++ b/srpt/Makefile @@ -87,7 +87,12 @@ run_conftest = $(shell \ else \ output=conftest/$1/build-output-$(KVER).txt; \ fi; \ - if MAKEFLAGS= make -C $(KDIR) V=$(V) M="$(shell pwd)/conftest/$1" CONFTEST_CFLAGS="-Werror $(OFED_CFLAGS)" $(OFED_CONFIG) KBUILD_EXTRA_SYMBOLS="$(OFED_MODULE_SYMVERS)" 1>&2 2>$${output}; then \ + if MAKEFLAGS= make -C $(KDIR) V=$(V) \ + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") \ + M="$(shell pwd)/conftest/$1" \ + CONFTEST_CFLAGS="-Werror $(OFED_CFLAGS)" $(OFED_CONFIG) \ + KBUILD_EXTRA_SYMBOLS="$(OFED_MODULE_SYMVERS)" \ + 1>&2 2>$${output}; then \ echo "$(strip $2)"; \ else \ echo "$(strip $3)"; \ @@ -107,16 +112,20 @@ CONFTEST_CFLAGS = $(OFED_CFLAGS) \ done) all: check $(CONFTEST_OUTPUTS) - $(MAKE) -C $(KDIR) M=$(shell pwd)/src CONFTEST_CFLAGS="$(CONFTEST_CFLAGS)"\ - $(OFED_CONFIG) modules + $(MAKE) -C $(KDIR) M=$(shell pwd)/src \ + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") \ + CONFTEST_CFLAGS="$(CONFTEST_CFLAGS)" \ + $(OFED_CONFIG) modules install: all @[ -z "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && \ find /lib/modules/$(KVER) -name ib_srpt.ko -exec rm {} \; ; \ true (cd src && KDIR=$(KDIR) ../../scripts/sign-modules) - $(MAKE) -C $(KDIR) M=$(shell pwd)/src CONFTEST_CFLAGS="$(CONFTEST_CFLAGS)" \ - $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ + $(MAKE) -C $(KDIR) M=$(shell pwd)/src \ + $(shell [ -n "$(CC)" ] && echo CC="$(CC)") \ + CONFTEST_CFLAGS="$(CONFTEST_CFLAGS)" \ + $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ CONFIG_MODULE_SIG_ALL= modules_install uninstall: