-
Notifications
You must be signed in to change notification settings - Fork 1.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
freebsd: fix bootstrapping tools under Linux/musl #15780
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.
This is part of my work on making FreeBSD build under Chimera Linux; it builds :)
That's pretty cool.
Can you just address the make cstyle
issue, then force update the PR.
musl libc has deprecated LFS64 aliases, so bootstrapping FreeBSD tools under musl distros has been failing with stat64 errors. Apply the aliases under non-glibc Linux to fix this problem. Signed-off-by: Val Packett <[email protected]>
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.
This should cause build failures on older versions of musl due to -Werror (unless we are not using it on FreeBSD and I have yet to realize). We should use #ifundef as a guard against multiple definitions to avoid problems on them.
This also would likely cause build failures on systems using uclibc and klibc. At a glance, uclibc appears to mimic glibc while klibc is like musl, but defines these. I am not sure if anyone is using these libcs (or if we even build on them at present), but we probably should also include !defined(__UCLIBC__)
in the linux check. klibc should not need an explicit check as long as it has the multiple definition protection meant for older musl libc versions.
@behlendorf Boostrapping FreeBSD on other Linux libcs is likely broken in other places (since I doubt anyone ever does it), so it would not be terrible if you merge this without minor corrections for the portability issues that I raised. |
@ryao I fully expect there are other compatibility issues out there lurking. We'll have to fix those as they're encountered. |
musl libc has deprecated LFS64 aliases, so bootstrapping FreeBSD tools under musl distros has been failing with stat64 errors. Apply the aliases under non-glibc Linux to fix this problem. Reviewed-by: Richard Yao <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Val Packett <[email protected]> Closes openzfs#15780
musl libc has deprecated LFS64 aliases, so bootstrapping FreeBSD tools under musl distros has been failing with stat64 errors. Apply the aliases under non-glibc Linux to fix this problem. Reviewed-by: Richard Yao <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Val Packett <[email protected]> Closes #15780
musl libc has deprecated LFS64 aliases, so bootstrapping FreeBSD tools under musl distros has been failing with stat64 errors. Apply the aliases under non-glibc Linux to fix this problem. Reviewed-by: Richard Yao <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Val Packett <[email protected]> Closes openzfs#15780
musl libc has deprecated LFS64 aliases, so bootstrapping FreeBSD tools under musl distros has been failing with stat64 errors. Apply the aliases under non-glibc Linux to fix this problem. Reviewed-by: Richard Yao <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Val Packett <[email protected]> Closes openzfs#15780
Motivation and Context
musl libc has deprecated LFS64 aliases, so bootstrapping FreeBSD tools under musl distros has been failing with stat64 errors.
Description
Apply the aliases under non-glibc Linux to fix this problem.
How Has This Been Tested?
This is part of my work on making FreeBSD build under Chimera Linux; it builds :)
Types of changes
Checklist:
Signed-off-by
.