Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9181653imu; Tue, 4 Dec 2018 23:48:32 -0800 (PST) X-Google-Smtp-Source: AFSGD/VF3zrk9rIQaVOAJxBLXKy6ee1ps0dblwcCzIuRYPTygAZPGxHZ0K/VxnqB1KnW/1IfC+rX X-Received: by 2002:a63:ba48:: with SMTP id l8mr19215413pgu.72.1543996111985; Tue, 04 Dec 2018 23:48:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543996111; cv=none; d=google.com; s=arc-20160816; b=ZskU4b3Aulu3V3OudJ+ZGOVjhLate9Lk/OdLYreL9bfO2/JnBnNxpL4uOuE9eA3zNp Zt4h/M5uNOvjoy/UMAkaeEx0AkV/T/Tzmrs1+vTWCAGQQ4NJqWByaZMi5k5WDUyHn6it hAKtqPRYDdvG60Zc5nQb5E6uYJ9Q/7O3DWAG7v6kszTSSJ2DVWhFfHzAw5CS1Up3Yr4Z 2Vc8O0O4n3K11yF66hnqE93fq7D4QcOZQ3Os1ltSIE9usl60MTK79Cv1G1wQu+PhiBoI LCoIotEB78pXVkpP06R7UaMC0t+sk9bS9ArZyRKVI8V8ZBEQ+MDy2Z17QbcgDJHIBXI8 bUgw== 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=VU3CSB8NqbVIImuL1EXr5xNgRqhirsi7OVg5kecnzHc=; b=dUdGI/OG+Geq/syIdfBqjZbU3Zyh8RSfpgXbIYFXdH4ds8RxPAwunMbrunQiFv/a8O 0er1jNc0+zOCxUG+r+jVHvcQOMHt+NzO4XQdq31bBQR9GK4fGQxlkHsuaAyQQ1hdPf19 fnZl1WEhDjjQP9m96GgNUjOymLbV2TF7m5d7rdUUIpU3pd8dlG9axP2MhPlDcN07t28C hVb2iGEFQmXMQ5iR2MdG9Qhm5ulJLlXbekW+KSkYqZCJWpbWbDQV29paJVaIZYR7Aql3 JflnN1TuU2hyd+zbfHN9n/zDAKKPZdIA2Wjye1uUjIHdeV9cFRzYWeC/spWvTqEHZJag Gx1Q== 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 p126si16586595pgp.529.2018.12.04.23.48.16; Tue, 04 Dec 2018 23:48:31 -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 S1727066AbeLEHqc (ORCPT + 99 others); Wed, 5 Dec 2018 02:46:32 -0500 Received: from terminus.zytor.com ([198.137.202.136]:43407 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726171AbeLEHqc (ORCPT ); Wed, 5 Dec 2018 02:46:32 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id wB57jrwo1191003 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 4 Dec 2018 23:45:53 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id wB57jrWf1191000; Tue, 4 Dec 2018 23:45:53 -0800 Date: Tue, 4 Dec 2018 23:45: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: mingo@kernel.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, zhenzhong.duan@oracle.com, torvalds@linux-foundation.org, yamada.masahiro@socionext.com, mroos@linux.ee, peterz@infradead.org, bp@alien8.de, hpa@zytor.com Reply-To: bp@alien8.de, hpa@zytor.com, mroos@linux.ee, peterz@infradead.org, torvalds@linux-foundation.org, yamada.masahiro@socionext.com, zhenzhong.duan@oracle.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@kernel.org 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: 10b87bc9f630a38a7f0c1e7cf13ff23fea1692ec 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: 10b87bc9f630a38a7f0c1e7cf13ff23fea1692ec Gitweb: https://git.kernel.org/tip/10b87bc9f630a38a7f0c1e7cf13ff23fea1692ec Author: Masahiro Yamada AuthorDate: Wed, 5 Dec 2018 15:27:19 +0900 Committer: Ingo Molnar CommitDate: Wed, 5 Dec 2018 08:42:09 +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 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