-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
glibc cross-compilation breaks the ABI #3291
Comments
goodness, how many different versioning schemes does glibc have at once? I think a reasonable workaround for this would be to bump the default target glibc version on aarch64 to whatever was the first one where To fix it for older glibc versions will require patching header files to check the target glibc version and define |
OK I actually tested the above thing and the problem is something else. For reference here's command line when compiling glibc fstat.c:
If you look at a grep of where
You can see that the directory getting picked up is:
For a value of 3. But the correct value is 0:
I'm confused because the only ways it gets defined to 0 are these:
Is
Apparently it is. OK. |
#3288 is a clear example of this. Since glibc's
fstat
is just a thin wrapper around__fxstat
(this is done in order to let glibc change the stat struct in a backwards-compatible way) we ship a small stub infstat.c
.Link to the glibc implementation.
For some weird reason that has everything to do with the include order passed to the
cc
process (or a mismatch between the version declared in the headers vs the one used by the host glibc) we end up picking a_STAT_VER
from the host system instead of using the correct one as defined in the target glibc's headers.AArch64's glibc is not happy of this and returns
EINVAL
.The text was updated successfully, but these errors were encountered: