Restore support for building with clang

The previous commit removed support for building with clang. Restore support
for building with clang without breaking cross-compilation support.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9209 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2020-12-05 21:23:17 +00:00
parent 8eb850acce
commit d10a7bf5d5
11 changed files with 75 additions and 27 deletions
+8 -5
View File
@@ -88,6 +88,7 @@ run_conftest = $(shell \
output=conftest/$1/build-output-$(KVER).txt; \
fi; \
if MAKEFLAGS= make -C $(KDIR) V=$(V) \
$(shell [ -n "$(PASS_CC_TO_MAKE)" ] && echo CC="$(CC)") \
M="$(shell pwd)/conftest/$1" \
CONFTEST_CFLAGS="-Werror $(OFED_CFLAGS)" $(OFED_CONFIG) \
KBUILD_EXTRA_SYMBOLS="$(OFED_MODULE_SYMVERS)" \
@@ -111,8 +112,9 @@ CONFTEST_CFLAGS = $(OFED_CFLAGS) \
done)
all: check $(CONFTEST_OUTPUTS)
$(MAKE) -C $(KDIR) M=$(shell pwd)/src \
CONFTEST_CFLAGS="$(CONFTEST_CFLAGS)" \
$(MAKE) -C $(KDIR) M=$(shell pwd)/src \
$(shell [ -n "$(PASS_CC_TO_MAKE)" ] && echo CC="$(CC)") \
CONFTEST_CFLAGS="$(CONFTEST_CFLAGS)" \
$(OFED_CONFIG) modules
install: all
@@ -120,9 +122,10 @@ install: all
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 "$(PASS_CC_TO_MAKE)" ] && echo CC="$(CC)") \
CONFTEST_CFLAGS="$(CONFTEST_CFLAGS)" \
$$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \
CONFIG_MODULE_SIG_ALL= modules_install
uninstall: