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

Auto-include linux cross-compile headers #257

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

EdwardLarson
Copy link
Collaborator

@EdwardLarson EdwardLarson commented Mar 18, 2023

One sentence summary of this PR (This should go in the CHANGELOG!)

  • Add PatchMaker option to auto-choose a linux cross-compiler header include path
  • PatchFromSourceModifier and FunctionReplaceModifier automatically include cross-compile headers for target system

Link to Related Issue(s)

Please describe the changes in your request.

Automatically include the linux cross-compile headers. These headers are necessary for any patch which would need to use things defined in these headers; because we can install the standard headers and pretty easily determine which set of headers we need, and it would be a pain for a user to figure out on their own (you get errors about headers being missing, most google results will suggest you install gcc-multilib which actually uninstalls all of our GNU toolchains), I think it's very much worth adding. Including these headers makes it much more likely a user's patch "just works."

That option currently defaults to False (don't auto-include these headers). However, the PatchFromSourceModifier and FunctionReplaceModifier always use it.

Also note that it is a PatchMaker option, not a Toolchain option. I'm willing to move it to ToolchainConfig, but I wanted to test the waters for moving some options out of ToolchainConfig and into PatchMaker. My thoughts are that some options are much more related to the "meta" workings of PatchMaker than the actual object files being built. Some other options that I believe would more naturally fit in PatchMaker.init and not ToolchainConfig are:

  • create_map_files
  • check_overlap
  • userspace_dynamic_linker (not too sure about this option)
  • perhaps debug_info

These are options that are not so much concerned with that actual code in the object files, but additional functionality/features that may be generated in addition to the code.

Anyone you think should look at this, specifically?

@EdwardLarson EdwardLarson changed the title Auto-import linux cross-compile headers Auto-include linux cross-compile headers Mar 21, 2023
@EdwardLarson EdwardLarson requested a review from whyitfor March 22, 2023 19:32
@whyitfor
Copy link
Contributor

@EdwardLarson, do some merge conflicts need to be handled here before review?

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

Successfully merging this pull request may close these issues.

3 participants