-
Notifications
You must be signed in to change notification settings - Fork 435
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
Fix building under UML #881
Conversation
3015c66
to
3aa68a3
Compare
Explain how to run unit tests and documentation tests. Note that the documentation uses "--arch=x86_64" to run KUnit tests because UML is not working at the moment [1]. [1] Rust-for-Linux#881 Signed-off-by: José Expósito <[email protected]>
Explain how to run unit tests and documentation tests. Note that the documentation uses "--arch=x86_64" to run KUnit tests because UML is not working at the moment [1]. [1] Rust-for-Linux/linux#881 Signed-off-by: José Expósito <[email protected]>
Explain how to run unit tests and documentation tests. Note that the documentation uses "--arch=x86_64" to run KUnit tests because UML is not working at the moment [1]. [1] Rust-for-Linux/linux#881 Reviewed-by: David Gow <[email protected]> Signed-off-by: José Expósito <[email protected]>
Explain how to run unit tests and documentation tests. Note that the documentation uses "--arch=x86_64" to run KUnit tests because UML is not working at the moment [1]. [1] Rust-for-Linux#881 Reviewed-by: David Gow <[email protected]> Signed-off-by: José Expósito <[email protected]>
As alluded to in ClangBuiltLinux#1715 -- UML is very particular about its linker options, so I suspect it'd take a fair bit of work (and more knowledge than I have) to fix this on the UML side. I've rebased it and verified it still works, so if there's no objection to working around this on the Rust side, and things like disabling SSE/SSE2 don't break anything, I think it makes sense to merge this for now. That'll also remove the need to recommend |
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.
LGTM
Add a .kunitconfig file with the required configuration options to allow to easily run the KUnit tests without adding them manually: $ ./tools/testing/kunit/kunit.py run --kunitconfig=rust \ --make_options LLVM=1 --arch=x86_64 Note that "CONFIG_UML" is set to "n" because UML is not working at the moment [1]. [1] Rust-for-Linux/linux#881 Reviewed-by: David Gow <[email protected]> Signed-off-by: José Expósito <[email protected]>
Explain how to run unit tests and documentation tests. Note that the documentation uses "--arch=x86_64" to run KUnit tests because UML is not working at the moment [1]. [1] Rust-for-Linux/linux#881 Reviewed-by: David Gow <[email protected]> Signed-off-by: José Expósito <[email protected]>
Add a .kunitconfig file with the required configuration options to allow to easily run the KUnit tests without adding them manually: $ ./tools/testing/kunit/kunit.py run --kunitconfig=rust \ --make_options LLVM=1 --arch=x86_64 Note that "CONFIG_UML" is set to "n" because UML is not working at the moment [1]. [1] Rust-for-Linux#881 Reviewed-by: David Gow <[email protected]> Signed-off-by: José Expósito <[email protected]>
Explain how to run unit tests and documentation tests. Note that the documentation uses "--arch=x86_64" to run KUnit tests because UML is not working at the moment [1]. [1] Rust-for-Linux#881 Reviewed-by: David Gow <[email protected]> Signed-off-by: José Expósito <[email protected]>
scripts/generate_rust_target.rs
Outdated
if cfg.has("UML") { | ||
ts.push("relocation-model", "pie"); | ||
} else { | ||
ts.push("relocation-model", "static"); | ||
} |
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.
Since using target spec files is considered unstable inrustc
, we are trying to use as many (stable) flags as possible instead, in hopes that, eventually, we will be have an easier time to move to stable-only builds. Could you please override the relocation model via arch/um/Makefile
with KBUILD_RUSTFLAGS +=
?
scripts/generate_rust_target.rs
Outdated
@@ -204,7 +204,7 @@ fn main() { | |||
"data-layout", | |||
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128", | |||
); | |||
let mut features = "-3dnow,-3dnowa,-mmx,+soft-float".to_string(); | |||
let mut features = "-3dnow,-3dnowa,-mmx,+soft-float,-sse,-sse2".to_string(); |
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.
SSE2 is already disabled already through the arch/x86/Makefile
:
KBUILD_RUSTFLAGS += -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2
But of course that doesn't get picked up by ARCH=um
... This seems to work:
KBUILD_RUSTFLAGS += -Ctarget-feature=-sse
in arch/um/Makefile
(-sse
seems enough), probably with a subarch conditional. That way, it is more localized (since it is a change for UML) and we avoid the unstable target spec file. Or, if UML is supposed to use the same flags, we can just copy the entire line.
I minimized our case down to https://godbolt.org/z/vWcadW96h, and noticed it doesn't happen anymore starting with rustc
1.65.0. Since that version upgraded to LLVM 15 in rust-lang/rust#99464, I guess we can assume it got fixed on LLVM's side (or somehow it doesn't trigger it anymore).
And indeed, with rustc 1.65.0 I could get pass that part compiling the kernel.
But again, we probably want the same flags as x86 anyway, right?
The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 14 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux#881 Signed-off-by: David Gow <[email protected]>
Thanks, Miguel. I've updated the series to move everything to the various Makefiles. Let me know if you'd rather I send this (or something similar) in via the UML mailing list / tree. |
Thanks a lot! This will make it simpler later on for us. Looks good to me -- a couple things I noticed:
It would be great if the UML maintainers take it, actually, so that they start to get involved etc. But if they don't want, I can also route it through the Rust tree. Feel free to email both mailing lists! By the way, it would be also a good opportunity to see if they want UML listed in |
UML expects a position independent executable for some reason, so tell rustc to generate pie objects. Otherwise we get a bunch of relocations we can't deal with in libcore. Signed-off-by: David Gow <[email protected]>
The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux#881 Signed-off-by: David Gow <[email protected]>
I've sent this out (along with the |
The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
Yeah, let's merge this to make |
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818679478933dd1d9718741f4daa3f4e8b86 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818679478933dd1d9718741f4daa3f4e8b86 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
commit 8849818 upstream. The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
BugLink: https://bugs.launchpad.net/bugs/2025066 commit 8849818679478933dd1d9718741f4daa3f4e8b86 upstream. The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Kamal Mostafa <[email protected]> Signed-off-by: Stefan Bader <[email protected]>
[ Upstream commit 8849818679478933dd1d9718741f4daa3f4e8b86 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8849818679478933dd1d9718741f4daa3f4e8b86 ] The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: Rust-for-Linux/linux#881 Signed-off-by: David Gow <[email protected]> Reviewed-by: Sergio González Collado <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
At some point, UML (arch/um) support got broken.
We were able to work out the two causes of this at Kangrejos:
There's almost definitely a better way of fixing these, and even these fixes would need to be better understood and documented, but I'm putting this out there so we have some documentation of the problems, and something we can apply to test against.