From nobody Sun Sep 14 14:27:38 2025 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 A154CC25B4E for ; Fri, 20 Jan 2023 17:00:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229980AbjATRA4 (ORCPT ); Fri, 20 Jan 2023 12:00:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229950AbjATRAy (ORCPT ); Fri, 20 Jan 2023 12:00:54 -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 7D0C6A24F for ; Fri, 20 Jan 2023 09:00:50 -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 E2AE26200E for ; Fri, 20 Jan 2023 17:00:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7518C433EF; Fri, 20 Jan 2023 17:00:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674234049; bh=dwZhp8aBPBiICpzA8NU+t7gKAGEqi9aHyM2Bfh2kUgw=; h=From:To:Cc:Subject:Date:From; b=sC5wWNOJA8pXM1aycutcIitS/YTxVe8MeT+enIMQSbnzTgia9j8dd2MAFAiqoXD21 uuvuB3cqdaC4R3l+vhiPktWu3EBmG2XUMY1sEC4Ice+0BFVgJmo4u68Mrkep8uZPj5 LJzg32IL3gNMUQqcTzXfw6vlriOE6Awj1TuUI0eijkdKOHaqctGac11YOZWOz/M6ct IRwIzWcsjMrezC5Ixpw4RevXoRHKD+BJ9j7IhcW6tS0tntG4EzYgYrefZPXHTY18Jv HEuXYy1pGOhP/dIWROPDnyjJ72ttHaI0L3dEZpvN1GM6XSjFhvzPhGnZuclWUOi5ft J72S6op2xriCQ== From: Nathan Chancellor To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, llvm@lists.linux.dev, Nathan Chancellor , Peter Zijlstra , Nick Desaulniers Subject: [PATCH RESEND] x86/build: Move '-mindirect-branch-cs-prefix' out of GCC-only block Date: Fri, 20 Jan 2023 09:58:27 -0700 Message-Id: <20230120165826.2469302-1-nathan@kernel.org> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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. Link: https://github.com/ClangBuiltLinux/linux/issues/1665 Link: https://github.com/llvm/llvm-project/commit/6f867f9102838ebe314c1f366= 1fdf95700386e5a Acked-by: Peter Zijlstra (Intel) Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Signed-off-by: Nathan Chancellor --- I picked up the tags on the previous patch but otherwise, this is indentical to the original posting: https://lore.kernel.org/20220817185410.1174782-1-nathan@kernel.org/ arch/x86/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 9cf07322875a..73ed982d4100 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -14,13 +14,13 @@ endif =20 ifdef CONFIG_CC_IS_GCC RETPOLINE_CFLAGS :=3D $(call cc-option,-mindirect-branch=3Dthunk-extern -m= indirect-branch-register) -RETPOLINE_CFLAGS +=3D $(call cc-option,-mindirect-branch-cs-prefix) RETPOLINE_VDSO_CFLAGS :=3D $(call cc-option,-mindirect-branch=3Dthunk-inli= ne -mindirect-branch-register) endif ifdef CONFIG_CC_IS_CLANG RETPOLINE_CFLAGS :=3D -mretpoline-external-thunk RETPOLINE_VDSO_CFLAGS :=3D -mretpoline endif +RETPOLINE_CFLAGS +=3D $(call cc-option,-mindirect-branch-cs-prefix) =20 ifdef CONFIG_RETHUNK RETHUNK_CFLAGS :=3D -mfunction-return=3Dthunk-extern base-commit: 5dc4c995db9eb45f6373a956eb1f69460e69e6d4 --=20 2.39.1