From 86d602973b7747c5c154c840ce9221b582d8e868 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 26 Jul 2020 23:52:40 +0000 Subject: [PATCH] iscsi-scst: Make this kernel module again independent of (M)OFED This patch reverts f58c8248dd8f ("iscst-scst: Fix the OFED build"). This patch partially reverts bd3355500a41 ("iscsi-scst, srpt: Rename the PRE_CFLAGS variable into CONFTEST_FLAGS"). git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9085 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/Makefile | 16 +++++++++------- iscsi-scst/kernel/Kbuild | 4 +--- iscsi-scst/kernel/isert-scst/Kbuild | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/iscsi-scst/Makefile b/iscsi-scst/Makefile index 6dda3422c..7ac41c95d 100644 --- a/iscsi-scst/Makefile +++ b/iscsi-scst/Makefile @@ -123,19 +123,21 @@ CONFTEST_OUTPUTS = $(shell \ echo $$t/result-$(KVER).txt; \ done) -CONFTEST_CFLAGS = $(OFED_CFLAGS) \ - -DOFED_FLAVOR=$(OFED_FLAVOR) \ +CONFTEST_CFLAGS = \ $(shell for t in $(CONFTESTS); do \ cat $$t/result-$(KVER).txt 2>/dev/null; \ done) +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)" modules + $(MAKE) -C $(KDIR) M=$(KMOD) CONFTEST_CFLAGS="$(CONFTEST_CFLAGS)"\ + modules echo "$@: INFINIBAND_ENABLED = $(INFINIBAND_ENABLED)" - if $(INFINIBAND_ENABLED); then \ - echo " Building against $(OFED_FLAVOR) RDMA kernel headers."; \ - $(MAKE) -C $(KDIR) M=$(ISERTMOD) CONFTEST_CFLAGS="$(CONFTEST_CFLAGS)"\ - $(OFED_CONFIG) modules; \ + if $(INFINIBAND_ENABLED); then \ + echo " Building against $(OFED_FLAVOR) RDMA kernel headers.";\ + $(MAKE) -C $(KDIR) M=$(ISERTMOD) ISER_CFLAGS="$(ISER_CFLAGS)" \ + $(OFED_CONFIG) modules; \ fi progs: include/iscsi_scst_itf_ver.h diff --git a/iscsi-scst/kernel/Kbuild b/iscsi-scst/kernel/Kbuild index 08feb06b1..c6d33400d 100644 --- a/iscsi-scst/kernel/Kbuild +++ b/iscsi-scst/kernel/Kbuild @@ -14,9 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -KBUILD_EXTRA_SYMBOLS = $(src)/../../scst/src/Module.symvers \ - $(shell for d in /usr/src/ofa_kernel/default/Module.symvers; do\ - [ -e $$d ] || continue; echo $$d; break; done) +KBUILD_EXTRA_SYMBOLS = $(src)/../../scst/src/Module.symvers ccflags-y += -I$(src)/../include -I$(src)/../../scst/include ccflags-y += $(CONFTEST_CFLAGS) diff --git a/iscsi-scst/kernel/isert-scst/Kbuild b/iscsi-scst/kernel/isert-scst/Kbuild index 6d583711e..932a6bf87 100644 --- a/iscsi-scst/kernel/isert-scst/Kbuild +++ b/iscsi-scst/kernel/isert-scst/Kbuild @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -LINUXINCLUDE := $(CONFTEST_CFLAGS) $(LINUXINCLUDE) +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)