dr_checker
dr_checker copied to clipboard
How to compile driver using clang
Hi, I encountered a difficulty about how to compile driver using clang and I find your tool can make it so I need your help.
For example, I want to compile the bluetooth module of the drivers in the linux kernel 4.19.9. I substitute the gcc by clang in the Makefile. But there were some mistakes and it says "You are building kernel with non-retpoline compiler, please update your compiler." .
So, if you intend to compile the bluetooth module, what will you do? Could you explain it?
Thanks.
Is it for x86_64?
Is it for x86_64?
Yes. I find that the issue is that clang cannot pass the check before beginning compiling the kernel. Now I find a walk-around to bypass the check, but when I'm compiling, the clang compiler complains about asm
./arch/x86/include/asm/atomic.h:200:1559: error: invalid output constraint
'=@ccz' in asm
...%[ptr]" "\n\t/* output condition code " "z" "*/\n" : "=@cc" "z" (success...