Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp5158621rwb; Wed, 17 Aug 2022 12:08:15 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Wk+snuY6C3ZpBXX/25fsKZv90DFi8YWMquw8BweYFM+WO0WdDxqhaby3hT9+mBbQH/XT+ X-Received: by 2002:a63:1857:0:b0:41c:4217:426e with SMTP id 23-20020a631857000000b0041c4217426emr22822283pgy.285.1660763294873; Wed, 17 Aug 2022 12:08:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660763294; cv=none; d=google.com; s=arc-20160816; b=Lv+tSHHtK7SuHKUIXJnW+bAgUkwheDHVMWm4aySziAkgQTEL/HLOQz6PU2UjAIer9G W3AT12JUSMej/6c9ffC6t4yB6ZcMB3XkBQMxmtnR540FtrXL2J5yIM5QDZUifXDw4XEq PEBybv794AKK7QKsmWDhnBLDurg3LXpX75QdqfSobIiCQjWJyfByGhwMeQD2wunBeRfS KFpob04CFXXMeevW03vFTtjTnF3F40o/CG5Er3aBcv/FBS5yKC8VyL85wBI6pXsN52re SiVNAdE8bDgkVsiPSLR8kevguZ0N7pjdCVQUjNEkmhnWWlJZS0jcO72MNFiMjoCSSLwy VJYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=6Eu/LSdRYhVuLZQknpbUA0qLhEl7E/QFuNwfVX5HNMI=; b=ODYQ5+dM+fQHEq8pszJZ+9/8IEtVRTH+14GJiR6Pu47BLj7o7ngD0EqDpUb4Jimj8v vxMr5bZwbx5pw9puIUG1KnF87BmX8ZjmqDo37Fbizzsa1V65h5CzRsz827EegKcWcjog 8YYFn0WiRxXPSrYXKm0YoVbCig6UqLeP9y7T/x4Qzh3V6M3apgLH/vLFWIof/3cWf9K7 IU8kGEIu5GgUvo7U0/AMw5ruVmdyY1PqyE9yTVeag7Ky997euacBDdAiYMlakL2OkNM2 6RPb9Sl5/FXmdOnvzC000AgObGXedtDE797V85n/junCauHvNlEB80xa2z5UgghBTUyc 6dyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uNWnWrGa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d5-20020a655ac5000000b0041a0a9d87cfsi16675681pgt.244.2022.08.17.12.08.02; Wed, 17 Aug 2022 12:08:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uNWnWrGa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238683AbiHQS42 (ORCPT + 99 others); Wed, 17 Aug 2022 14:56:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238392AbiHQS41 (ORCPT ); Wed, 17 Aug 2022 14:56:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DC4C5AA26 for ; Wed, 17 Aug 2022 11:56:27 -0700 (PDT) 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 AFADA612D6 for ; Wed, 17 Aug 2022 18:56:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 760D0C433C1; Wed, 17 Aug 2022 18:56:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660762586; bh=eXADiVpfHcg0p9ebNKYLyPPBKa0498jYFVcf8rw3DfU=; h=From:To:Cc:Subject:Date:From; b=uNWnWrGa/iA9AbTblZpKPjGugAP02+5bUCO0KgE8GYJ+AbiTtX7Oj3AJO6Penfi4H kCaRdNt4a4M1NjPJJJRO+uXXqbUL1LcC+rjJbbaTw4Bha+MjS6xlfCIIAGcnE+nOhm 7i0hNyv8kavo3JM1CgW+IV5/73keVGbmszNIPkdYvVMA4wHUvMXHh7U9gvSwl03Oh/ 4Waosb7Zt9klX+ERpUpQorjzACE7TAk2RjVPiAeCCAIPpYrmu1MSvSmKR5GB30RlBO K9do2XoSZ++RS3wyxcb8PA63VR9ofENLGDiFwpypjpF/Y415zsxdCscOqACtN1l8qb grEMlSj3LnaRQ== From: Nathan Chancellor To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org Cc: Peter Zijlstra , Nick Desaulniers , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor Subject: [PATCH] x86/build: Move '-mindirect-branch-cs-prefix' out of GCC-only block Date: Wed, 17 Aug 2022 11:54:11 -0700 Message-Id: <20220817185410.1174782-1-nathan@kernel.org> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/6f867f9102838ebe314c1f3661fdf95700386e5a Signed-off-by: Nathan Chancellor --- I was not sure if this information is relevant for the commit message but I can boot without any issues on my test machines (two Intel and one AMD). arch/x86/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 7854685c5f25..987da87c7778 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 base-commit: 568035b01cfb107af8d2e4bd2fb9aea22cf5b868 -- 2.37.2