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
feat(clang): add clang support for riscv64 and aarch64 #77
base: main
Are you sure you want to change the base?
Conversation
I haven't delved too deeply into this yet, but I have a small suggestion. Could you please provide additional information in the PR description about how and in what targets you have tested this? Also, for arm targets, we should test this with armclang, not just clang. Plus, aarch32 must also be supported. @AfonsoSantos96 could you try to take a look at this? |
For Ubuntu 20.04, I've used
and I've effectively run bao on
|
@ninolomata , could you separate the changes into x number of meaningful commits? It would be easier to understand some of the changes made. I feel that e.g. with the bao code changes it was an iterative process, maybe that would be sufficient to map it to significant commits. |
Also, @ninolomata , could you clarify exactly what is need to compile the code with clang? I'm guessing:
Is my assumption correct? I've installed clang via a package manager. So all the executables are in /usr/bin. Could you clarify how you have installed clang also? |
Signed-off-by: Bruno Sa <bruno.vilaca.sa@gmail.com>
Clang assembler requires valid assembly; otherwise, an error is thrown. Instead of using "->" as the token to parse for assembly macro defines, we define the tokens "#", which is used for comments in assembly files. The generated output will be valid for both clang and gcc. Signed-off-by: Bruno Sa <bruno.vilaca.sa@gmail.com>
This commit fixes relocation errors identified by the clang compiler and marks the .gtl_page_tables section as no data otherwise there is a type mismatch. Signed-off-by: Bruno Sa <bruno.vilaca.sa@gmail.com>
This commit fixes some issues when using clang: - remove .directive .func which is not recognized by clang assembler; - make gtlb_page_tables as no data to avoid section type mismatch; - remove mov instructions with flexible second operand since ithey are not recognized by the clang assembler; Signed-off-by: Bruno Sa <bruno.vilaca.sa@gmail.com>
dbab11e
to
09d1e95
Compare
Another point is that we should include build checks for clang now that we have a CI pipeline. |
No description provided.