From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 881341A76C4; Tue, 30 Jul 2024 17:29:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722360592; cv=none; b=P4c8G4N8uvovq/rmUqkjXLLm5X+OXyxDj761UL4NiQlDfbDZ8O3LkR6MDwV/7vEEFf43a0t9Ghaq/2tqIO6asd4xITKSZ1D9n13geXpope+X9Uv0ErJfgqJxFvCTB3w6JKnPgmVzpbZ6wrEhS/bK3CxC/zA1su50WUkJV4rl738= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722360592; c=relaxed/simple; bh=FyBYpvMSruWe9eEbMd+LDl+FDra+y9obzM+3ykBauTo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TaQcNcNhPMk1uJ/OLfSjaPzWX7+mV6/g/IFIwBv5SDb1oaguMC/U6taJXtMwa52jMMyzmqhtSFFcu8HEFrLbEKKlYJRIBH601hIWODaGOsXJAxyxafYR3g5YYEVC5YxTridGzyz1sgTt+3FA66RpyEzN96AhRwxLdsFPHgcehgs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=CEGYaX6p; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="CEGYaX6p" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05DB5C32782; Tue, 30 Jul 2024 17:29:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1722360592; bh=FyBYpvMSruWe9eEbMd+LDl+FDra+y9obzM+3ykBauTo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CEGYaX6pG9oxB0fAEYIvqnBX1cPkSK3XJdcL0KDzw3ehVgEJc11wdnn0MA+oXyG5S NvD2Ii5xeH/uJR+nraNGrczAOnMoqPwSt4jIToGpELD+L/TuBVM8fi9P0YBZZH5GPm m4BbVsLAO68GSDgB70jOqq9b/mY1RPjEMkP9A3fo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, David Gow , Boqun Feng , Miguel Ojeda , Johannes Berg , Sasha Levin Subject: [PATCH 6.10 746/809] arch: um: rust: Use the generated target.json again Date: Tue, 30 Jul 2024 17:50:22 +0200 Message-ID: <20240730151754.420384107@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240730151724.637682316@linuxfoundation.org> References: <20240730151724.637682316@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: David Gow [ Upstream commit 9a2123b397bbe0da5e853273369d63779ac97c8c ] The Rust compiler can take a target config from 'target.json', which is generated by scripts/generate_rust_target.rs. It used to be that all Linux architectures used this to generate a target.json, but now architectures must opt-in to this, or they will default to the Rust compiler's built-in target definition. This is mostly okay for (64-bit) x86 and UML, except that it can generate SSE instructions, which we can't use in the kernel. So re-instate the custom target.json, which disables SSE (and generally enables the 'soft-float' feature). This fixes the following compile error: error: :0:0: in function _RNvMNtCs5QSdWC790r4_4core3f32f7next_up float (float): SSE register return with SSE disabled Fixes: f82811e22b48 ("rust: Refactor the build target to allow the use of builtin targets") Signed-off-by: David Gow Reviewed-by: Boqun Feng Tested-by: Miguel Ojeda Reviewed-by: Miguel Ojeda Link: https://patch.msgid.link/20240529093336.4075206-1-davidgow@google.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- arch/x86/Makefile.um | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um index 2106a2bd152bf..a46b1397ad01c 100644 --- a/arch/x86/Makefile.um +++ b/arch/x86/Makefile.um @@ -9,6 +9,7 @@ core-y += arch/x86/crypto/ # ifeq ($(CONFIG_CC_IS_CLANG),y) KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx +KBUILD_RUSTFLAGS += --target=$(objtree)/scripts/target.json KBUILD_RUSTFLAGS += -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2 endif -- 2.43.0