I made example module and it compile very well with gcc. But when I try to compile with clang, it report error and stop. How can I solve this problm?This is my Makfile:
obj-m += example_module.oDIR = $(shell pwd)KERNEL_DIR = /lib/modules/$(shell uname -r)/buildall: make -C $(KERNEL_DIR) M=$(DIR) modulesclean: make -C $(KERNEL_DIR) M=$(DIR) clean
I try this command:make CC=clang HOSTCC=clang
and this is error message.
error: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Werror,-Wunknown-warning-option]