From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C5BEC10F14 for ; Thu, 3 Oct 2019 17:29:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0F54120865 for ; Thu, 3 Oct 2019 17:29:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570123768; bh=FB4XVy2jvCqmDjccoNIb7z5U4Sf68+Zu8TPjSSL5quA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=lxSCw1XArftR48IU7icq1nGXQWdkQ6wYk8gLuWrjPpCAf41LMM1AzalloS6ZsRKDo d4Rj2fLQ8pjDrliYU4rZ7Lkh3VcOQ9XQfVs4qICPuzvep/lOEp6QkWTSJNVTDbryEI 4TTBhWxX8isGfCx6dni7IKM2LXM0WmbGPr/zcrS4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730505AbfJCR31 (ORCPT ); Thu, 3 Oct 2019 13:29:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:35132 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388100AbfJCQMo (ORCPT ); Thu, 3 Oct 2019 12:12:44 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 597E520865; Thu, 3 Oct 2019 16:12:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570119163; bh=FB4XVy2jvCqmDjccoNIb7z5U4Sf68+Zu8TPjSSL5quA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1ljPvCoHqJ/m+25ckhFZYrkAL6I5jyFPoCQEkn4jQtHdH/hiw6NwKsNTCdt6+aTqL JaazPO0Jmhhx5/fO6nJlRdOp3+F5yiBQLVq/gx6iBZuzfWxShH4Ir0Q7MzzTlecRa6 oAZiIQEx0M/PMXdc5V/P5bbo0Ug6iQEB/tvneoLs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "stable@vger.kernel.org, x86@kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor" , Nathan Chancellor Subject: [PATCH 4.14 149/185] x86/retpolines: Fix up backport of a9d57ef15cbe Date: Thu, 3 Oct 2019 17:53:47 +0200 Message-Id: <20191003154512.704851856@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154437.541662648@linuxfoundation.org> References: <20191003154437.541662648@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor Commit a9d57ef15cbe ("x86/retpolines: Disable switch jump tables when retpolines are enabled") added -fno-jump-tables to workaround a GCC issue while deliberately avoiding adding this flag when CONFIG_CC_IS_CLANG is set, which is defined by the kconfig system when CC=clang is provided. However, this symbol was added in 4.18 in commit 469cb7376c06 ("kconfig: add CC_IS_CLANG and CLANG_VERSION") so it is always undefined in 4.14, meaning -fno-jump-tables gets added when using Clang. Fix this up by using the equivalent $(cc-name) comparison, which matches what upstream did until commit 076f421da5d4 ("kbuild: replace cc-name test with CONFIG_CC_IS_CLANG"). Fixes: e28951100515 ("x86/retpolines: Disable switch jump tables when retpolines are enabled") Signed-off-by: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman --- arch/x86/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -249,7 +249,7 @@ ifdef CONFIG_RETPOLINE # retpoline builds, however, gcc does not for x86. This has # only been fixed starting from gcc stable version 8.4.0 and # onwards, but not for older ones. See gcc bug #86952. - ifndef CONFIG_CC_IS_CLANG + ifneq ($(cc-name), clang) KBUILD_CFLAGS += $(call cc-option,-fno-jump-tables) endif endif