Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9182824imu; Tue, 4 Dec 2018 23:50:32 -0800 (PST) X-Google-Smtp-Source: AFSGD/U0JUV8V5sc3NmSCQPV9WrXC00nylcs0NJhtOr5Kh1OMWm4/lAIg5zwbukTWebAnsFfKmnJ X-Received: by 2002:a63:df13:: with SMTP id u19mr19719706pgg.294.1543996232886; Tue, 04 Dec 2018 23:50:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543996232; cv=none; d=google.com; s=arc-20160816; b=iW6EHYVf3mWWoJbwT8pEyyCHUYyK5d0lj/wOHHK2jvhK1lblR5GHNRNVITVTaLYt8m hva33+ZJKoyJ9I5OpBvbje7WP6oD9ENDgioN0mR7CbfvqHl71cHyHhftCia5tFpJ0n0q tCLaLLucjcOh3ZhMfYvmCgN496ThZ8mNYqi/DPiAMIT87YVsv9ss4r24xX/tEBn1MIIh MzEvkT+UzZAFzq7O00TK0rgl1bObdqxe+oGwp+tc3BDzTc+TWj39TttoBq2Cei6x7Vhc HZhyfIP52kmpdyYZiCajAHyH8IjoObfJXhobjMoOhDPZr5QSK3tbZn4v6Kr5ljFq/UQY 169Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=XJ1zQo6bTyVMSvBL+a9LHNVXG2po0yj0gEBeCSDmir8=; b=KWJ2FizCtFEn8JZ13Go4P1G5ODqZO//CcrFSoQu90oh7uGIQzK9giKRfma+k03o+Rw /XVK9j0sd6sZaddFg8ft92Tsi8Reb2/6oOJbZtBTB9YuZGtFTvOimBofkHbC3RaUTwY5 2P8uKw4QxPmsF+sJTFYKMoPQiZPhhtiVjriddMKFMpPrrG1O8YQplSt64Gw7MnK9ktQg kYgTvryFqupnxrF4fp1EsEUkHQlKVgO2I35Ue2x6ZT+7PLl+yhbjCyChe2ZAbtmvdNPL ND8HYApwGbWbqyJIGIJvq+di1pl2IIB8PeZCCDHXnduVj8zEVg3q2Hrnzwoi+egehlRA /2zg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p126si16588852pgp.529.2018.12.04.23.50.17; Tue, 04 Dec 2018 23:50:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727336AbeLEHtW (ORCPT + 99 others); Wed, 5 Dec 2018 02:49:22 -0500 Received: from terminus.zytor.com ([198.137.202.136]:52371 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726351AbeLEHtV (ORCPT ); Wed, 5 Dec 2018 02:49:21 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id wB57mrNB1191666 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 4 Dec 2018 23:48:53 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id wB57mr2o1191663; Tue, 4 Dec 2018 23:48:53 -0800 Date: Tue, 4 Dec 2018 23:48:53 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Masahiro Yamada Message-ID: Cc: peterz@infradead.org, tglx@linutronix.de, torvalds@linux-foundation.org, zhenzhong.duan@oracle.com, mroos@linux.ee, linux-kernel@vger.kernel.org, mingo@kernel.org, bp@alien8.de, yamada.masahiro@socionext.com, hpa@zytor.com Reply-To: torvalds@linux-foundation.org, tglx@linutronix.de, peterz@infradead.org, mroos@linux.ee, zhenzhong.duan@oracle.com, bp@alien8.de, mingo@kernel.org, linux-kernel@vger.kernel.org, yamada.masahiro@socionext.com, hpa@zytor.com In-Reply-To: <1543991239-18476-1-git-send-email-yamada.masahiro@socionext.com> References: <1543991239-18476-1-git-send-email-yamada.masahiro@socionext.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/build: Fix compiler support check for CONFIG_RETPOLINE Git-Commit-ID: 25896d073d8a0403b07e6dec56f58e6c33678207 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 25896d073d8a0403b07e6dec56f58e6c33678207 Gitweb: https://git.kernel.org/tip/25896d073d8a0403b07e6dec56f58e6c33678207 Author: Masahiro Yamada AuthorDate: Wed, 5 Dec 2018 15:27:19 +0900 Committer: Ingo Molnar CommitDate: Wed, 5 Dec 2018 08:44:02 +0100 x86/build: Fix compiler support check for CONFIG_RETPOLINE It is troublesome to add a diagnostic like this to the Makefile parse stage because the top-level Makefile could be parsed with a stale include/config/auto.conf. Once you are hit by the error about non-retpoline compiler, the compilation still breaks even after disabling CONFIG_RETPOLINE. The easiest fix is to move this check to the "archprepare" like this commit did: 829fe4aa9ac1 ("x86: Allow generating user-space headers without a compiler") Reported-by: Meelis Roos Tested-by: Meelis Roos Signed-off-by: Masahiro Yamada Acked-by: Zhenzhong Duan Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Zhenzhong Duan Fixes: 4cd24de3a098 ("x86/retpoline: Make CONFIG_RETPOLINE depend on compiler support") Link: http://lkml.kernel.org/r/1543991239-18476-1-git-send-email-yamada.masahiro@socionext.com Link: https://lkml.org/lkml/2018/12/4/206 Signed-off-by: Ingo Molnar --- arch/x86/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index f5d7f4134524..75ef499a66e2 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -220,9 +220,6 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables # Avoid indirect branches in kernel to deal with Spectre ifdef CONFIG_RETPOLINE -ifeq ($(RETPOLINE_CFLAGS),) - $(error You are building kernel with non-retpoline compiler, please update your compiler.) -endif KBUILD_CFLAGS += $(RETPOLINE_CFLAGS) endif @@ -307,6 +304,13 @@ ifndef CC_HAVE_ASM_GOTO @echo Compiler lacks asm-goto support. @exit 1 endif +ifdef CONFIG_RETPOLINE +ifeq ($(RETPOLINE_CFLAGS),) + @echo "You are building kernel with non-retpoline compiler." >&2 + @echo "Please update your compiler." >&2 + @false +endif +endif archclean: $(Q)rm -rf $(objtree)/arch/i386