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

improve tools.cross_building to consider x86_64 -> x86 cross-compilation use-case #5870

Closed
3 tasks
SSE4 opened this issue Oct 7, 2019 · 2 comments · Fixed by #5904
Closed
3 tasks

improve tools.cross_building to consider x86_64 -> x86 cross-compilation use-case #5870

SSE4 opened this issue Oct 7, 2019 · 2 comments · Fixed by #5904

Comments

@SSE4
Copy link
Contributor

SSE4 commented Oct 7, 2019

often, x86_64 -> x86 cross-compilation could be considered the special case (if operation system is the same, of-course). it's because x86_64 systems may run x86 binaries, and usually there are so-called multilib compilers are available, so special preparations for cross-compilation aren't needed.
(NOTE: the opposite use-case x86 -> x86_64 isn't special, as x86 systems can't run x86_64 binaries)
there are many recipes which had to apply workarounds over tools.cross_building in order to satisfy their needs, e.g.:
https://github.com/conan-io/conan-center-index/blob/314ed91c6ecdbb6c21bba0eb3c438a6f3812060b/recipes/openssl/ALL/conanfile.py#L533
https://github.com/conan-io/conan-center-index/blob/9fd59cdef011bcbdcbcc3543cef9fa74714cb7e3/recipes/icu/all/conanfile.py#L145
https://github.com/bincrafters/conan-qt/blob/5093f8dc85ee01cb8b6d1baac2698c4b276cc9ce/conanfile.py#L518
it would be nice to provide an additional argument for tools.cross_building to return False for the the x86_64 -> x86 use-case (same OS)
proposal:

tools.cross_building(self.settings, native_x86=True)

To help us debug your issue please explain:

  • I've read the CONTRIBUTING guide.
  • I've specified the Conan version, operating system version and any tool that can be relevant.
  • I've explained the steps to reproduce the error or the motivation/use case of the question/suggestion.
@Hopobcn
Copy link
Contributor

Hopobcn commented Oct 8, 2019

Couldn't conan detect that the compiler is multilib to not require an extra paramter in tools.cross_building?

@SSE4
Copy link
Contributor Author

SSE4 commented Oct 9, 2019

@Hopobcn probably, it's also possible, as part of #5740

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

Successfully merging a pull request may close this issue.

3 participants