Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Cross compile handling #370

Closed
fedegiova opened this issue Apr 26, 2017 · 3 comments
Closed

Cross compile handling #370

fedegiova opened this issue Apr 26, 2017 · 3 comments
Labels

Comments

@fedegiova
Copy link

Hi, actually coati seems to use the x86 version of clang for indexing, this means that it's not able to index correctly arm code, for example indexing the linux kernel using a compilation database produces thousands of "unknown register name rx in asm" errors.

Any ideas on how to fix this? At least for arm since it's a widely used platform.

@mlangkabel
Copy link
Contributor

Hi @fedegiova, this is a good question. We haven't thoroughly tested cross compilation yet, but it seems like clang offers an option for that. You can set the option in your project settings by adding a line to the "Compiler Flags" listbox.

The option is called --target and you can find more information on how to configure it here.

As an example I'd set the following option for a project that should be build on a windows pc:
--target=x86_64-pc-win32-unknown

@fedegiova
Copy link
Author

Thank you for the suggestion, I've updated the compilation database replacing the -march switch
with --target=arm-linux-gnueabi and now it's working much better!

@egraether
Copy link
Contributor

Added a UI component for defining the cross-compilation triple with v2017.2.69 to make this easier in the future.

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

No branches or pull requests

3 participants