Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6334

Error during compile kernel module with clang: unknown warning option '-Wno-unused-but-set-variable';

$
0
0

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]

Viewing all articles
Browse latest Browse all 6334

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>