-
Notifications
You must be signed in to change notification settings - Fork 129
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
Library Forwarding: Allow reading standard library headers from a development x86 rootfs #4230
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing here seems scary to me.
Could you provide a vague run-down of the required tweaks for reference (or just post an example toolchain file)? |
I think that's right? |
Our Fedora setup is here: https://src.fedoraproject.org/rpms/fex-emu/pull-request/7 Fedora only ships "generic" cross-compilers with no system headers or glibc, which are intended to be used for freestanding code. The target tuple is different to the native compiler. To make those work for building thunks, we ship a minimal sysroot with just the required system headers (built from x86_64 devel packages), and toolchain files with include overrides and which disable linking with native libs and startup files (since those aren't needed for building shared libraries). I also force disable the cmake compiler checks, since this setup can't build executables (only libs). I don't think there's much more to do on the FEX side here, since these hacks are Fedora-specific. Distros which ship similar cross-compilers can do something similar, and will probably need their own tweaks anyway since the |
eef7657
to
fb16a0f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Will be useful to have those references around for anyone trying to set up FEX for development themselves.
I don't know what's up with that failing test... I don't see how it can be related to this PR? |
…elopment x86 rootfs
fb16a0f
to
d503366
Compare
Don't worry about it, this is pending on #4232 . (Happy holidays!) |
This is the last commit from #3597, rebased. It's sufficient to build FEX with thunks on Fedora aarch64, given a suitable x86_64/i686 sysroot with the required includes and glibc/libstdc++ and friends (and some gnarly toochain override files because the cross-compilers Fedora ships on aarch64 aren't actually configured identically to the native compilers on x86/x86_64).