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

Linux Kernel Assembly Macros #428

Closed
lsgunth opened this issue Nov 7, 2018 · 2 comments
Closed

Linux Kernel Assembly Macros #428

lsgunth opened this issue Nov 7, 2018 · 2 comments

Comments

@lsgunth
Copy link
Contributor

lsgunth commented Nov 7, 2018

Hi,

As of v4.20-rc1 icecc (and distcc for that matter) can no longer be used to distribute a compile of the linux kernel for x86. See this thread.

The problem is the kernel is now adding "-Wa,macros.s" argument to every compile option so that specific assembly macros can be used in inline assembly code across the kernel. When icecc sees this it forces a local compile and is thus useless for speeding up kernel compiles.

Is there any way this could be supported by icecc as there does not appear to be a good solution in the kernel?

Thanks,

Logan

@llunak
Copy link
Contributor

llunak commented Nov 17, 2018

The -Wa option (and the similar -Xassembler) are technically -Wa, , and whatever is passed to it gets passed to the assembler by the compiler. Since icecc doesn't know what the option may possibly be, it makes sense that a local compilation is forced.
But for the specific case of -Wa, this could be handled similarly to how -fplugin or Clang's -load are handled. See how the code in

bool analyse_argv(const char * const *argv, CompileJob &job, bool icerun, list<string> *extrafiles)
checks that and adds those files to "extrafiles".
In fact, looking there at the code handling -Wa, it explicitly checks for the -Wa, case and forces it to build locally, so that's where this handling should be added.

@lsgunth
Copy link
Contributor Author

lsgunth commented Nov 18, 2018

Thanks for the hints. I did find the -Wa handling but didn't see how the extrafiles worked. This makes it pretty straightforward to add support. I'll send a PR shortly.

Logan

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

3 participants