[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABVgOS=pr=jXq4qRrKaCy47xczDaFXFKCPanVvaZ+MfQmtwK8A@mail.gmail.com>
Date: Fri, 31 Mar 2023 16:25:44 +0800
From: David Gow <davidgow@...gle.com>
To: Richard Weinberger <richard@....at>,
Anton Ivanov <anton.ivanov@...bridgegreys.com>,
Johannes Berg <johannes@...solutions.net>
Cc: linux-um@...ts.infradead.org, x86@...nel.org, llvm@...ts.linux.dev,
rust-for-linux@...r.kernel.org, kunit-dev@...glegroups.com,
linux-kernel@...r.kernel.org, SeongJae Park <sj@...nel.org>,
Roberto Sassu <roberto.sassu@...weicloud.com>,
Miguel Ojeda <ojeda@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: [PATCH] arch:um: Only disable SSE on clang to work around old GCC bugs
On Sat, 18 Mar 2023 at 12:16, David Gow <davidgow@...gle.com> wrote:
>
> As part of the Rust support for UML, we disable SSE (and similar flags)
> to match the normal x86 builds. This both makes sense (we ideally want a
> similar configuration to x86), and works around a crash bug with SSE
> generation under Rust with LLVM.
>
> However, this breaks compiling stdlib.h under gcc < 11, as the x86_64
> ABI requires floating-point return values be stored in an SSE register.
> gcc 11 fixes this by only doing register allocation when a function is
> actually used, and since we never use atof(), it shouldn't be a problem:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99652
>
> Nevertheless, only disable SSE on clang setups, as that's a simple way
> of working around everyone's bugs.
>
> Fixes: 884981867947 ("rust: arch/um: Disable FP/SIMD instruction to match x86")
> Reported-by: Roberto Sassu <roberto.sassu@...weicloud.com>
> Link: https://lore.kernel.org/linux-um/6df2ecef9011d85654a82acd607fdcbc93ad593c.camel@huaweicloud.com/
> Tested-by: Roberto Sassu <roberto.sassu@...weicloud.com>
> Tested-by: SeongJae Park <sj@...nel.org>
> Signed-off-by: David Gow <davidgow@...gle.com>
> ---
Any chance we could get this picked up as a fix for 6.3? The UML build
is still broken with older gcc versions.
Cheers,
-- David
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4003 bytes)
Powered by blists - more mailing lists