Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to compile driver using clang #28

Open
ghost opened this issue Dec 20, 2018 · 2 comments
Open

How to compile driver using clang #28

ghost opened this issue Dec 20, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 20, 2018

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.

@Machiry
Copy link
Contributor

Machiry commented Dec 24, 2018

Is it for x86_64?

@ghost
Copy link
Author

ghost commented Dec 28, 2018

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant