Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B345DC636CC for ; Tue, 31 Jan 2023 15:00:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232633AbjAaPAr (ORCPT ); Tue, 31 Jan 2023 10:00:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232471AbjAaPAM (ORCPT ); Tue, 31 Jan 2023 10:00:12 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACE7446A2; Tue, 31 Jan 2023 07:00:11 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 121ED61562; Tue, 31 Jan 2023 15:00:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41BA5C4339B; Tue, 31 Jan 2023 15:00:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675177210; bh=MsX6TvKUrOgdywcPMMp13ZeuJnNul08OEcEkHSl1LGk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JIMXqcqN4P735uRh7TVvxSJt2zkQpHkQaH8VaqsnOIyzEg/SnnJigI/Rqlj5nhNdl 5jwfpZhQccbVXgezjr/yUUtlyriwwF0klQOHvutM53rBQDfhIg/X0e3NamSCqixOE4 vFZQYqzVpyts/qmptczYHzqYD1L7w3X3oqsQ0S9GR9eLOw1+34O60HKKnKANswzGcS duJ1lCFnLyV8e3k7h7MT5XgHpXyAw6RKwEA78HQnRCR/d+WZpG+mytppgm0VMh2o8V nUISXzQu+zFMcYpXyH+vUHYcU/SwGo8z28yZR5q+FCb4MScbs+GeUYtHlZKbtqda6s x6sZRfDELasQw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nathan Chancellor , Ingo Molnar , Nick Desaulniers , Peter Zijlstra , Sasha Levin , tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, llvm@lists.linux.dev Subject: [PATCH AUTOSEL 6.1 11/20] x86/build: Move '-mindirect-branch-cs-prefix' out of GCC-only block Date: Tue, 31 Jan 2023 09:59:37 -0500 Message-Id: <20230131145946.1249850-11-sashal@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230131145946.1249850-1-sashal@kernel.org> References: <20230131145946.1249850-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor [ Upstream commit 27b5de622ea3fe0ad5a31a0ebd9f7a0a276932d1 ] LLVM 16 will have support for this flag so move it out of the GCC-only block to allow LLVM builds to take advantage of it. Signed-off-by: Nathan Chancellor Signed-off-by: Ingo Molnar Tested-by: Nick Desaulniers Reviewed-by: Nick Desaulniers Acked-by: Peter Zijlstra (Intel) Link: https://github.com/ClangBuiltLinux/linux/issues/1665 Link: https://github.com/llvm/llvm-project/commit/6f867f9102838ebe314c1f3661fdf95700386e5a Link: https://lore.kernel.org/r/20230120165826.2469302-1-nathan@kernel.org Signed-off-by: Sasha Levin --- arch/x86/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 415a5d138de4..3419ffa2a350 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -14,13 +14,13 @@ endif ifdef CONFIG_CC_IS_GCC RETPOLINE_CFLAGS := $(call cc-option,-mindirect-branch=thunk-extern -mindirect-branch-register) -RETPOLINE_CFLAGS += $(call cc-option,-mindirect-branch-cs-prefix) RETPOLINE_VDSO_CFLAGS := $(call cc-option,-mindirect-branch=thunk-inline -mindirect-branch-register) endif ifdef CONFIG_CC_IS_CLANG RETPOLINE_CFLAGS := -mretpoline-external-thunk RETPOLINE_VDSO_CFLAGS := -mretpoline endif +RETPOLINE_CFLAGS += $(call cc-option,-mindirect-branch-cs-prefix) ifdef CONFIG_RETHUNK RETHUNK_CFLAGS := -mfunction-return=thunk-extern -- 2.39.0