From patchwork Mon Dec 17 16:17:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qian Cai X-Patchwork-Id: 10733755 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AED156C5 for ; Mon, 17 Dec 2018 16:17:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0AD22A1C0 for ; Mon, 17 Dec 2018 16:17:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 94B942A1C7; Mon, 17 Dec 2018 16:17:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 300F42A1C0 for ; Mon, 17 Dec 2018 16:17:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387878AbeLQQRs (ORCPT ); Mon, 17 Dec 2018 11:17:48 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:33352 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726667AbeLQQRs (ORCPT ); Mon, 17 Dec 2018 11:17:48 -0500 Received: by mail-qt1-f196.google.com with SMTP id l11so14713760qtp.0 for ; Mon, 17 Dec 2018 08:17:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FdHHPYu6Z4XIuervt8zemJE+EzH7eEXPplMx1qOEugw=; b=HXuUj1zhPaVV2QXZdkWaYbIytPal51D7HIX7+6pxZqmoWWfrEVsjEh+KEEqv+ufbxM 1oP99wZ1zP2H0M5JxVSxMJVkm5uNA16irF05FGgRWGepbH/D8SoIRwYC1az+gpqogHWi uOmSCPk3YOJpDoehwnW+xVrBicQ+ee7o2HWKR/LRuVYCkxEQZZX9t/gQGQWXBM9b33pr YwnJ2+CyzUXVHUgC7a8x87dVbi1cgA2GsD9+d0IhQMvv7+FCKqVkjQkIrxYMB42wdzZg fexqkqH+p4B9xZTYCiCirawEPObWQE9rqEJekyA13AdC2qGQlhPDukgWicQhzNoe286f tMaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=FdHHPYu6Z4XIuervt8zemJE+EzH7eEXPplMx1qOEugw=; b=KSRQg/Ef8tpRlyZo3SfjMHyCxEvTx9aM1iv7Vgv2mW5GBoMsIHvS1aF6qlem/kIhB+ EkA6JlbgEATUjgK8qhHKdIE3HVEwtO3sM+Y6vJJH1X9d4KnX09mxhkokZAfXqhbNLzGj +GtdHJbDe9OGI9DuuesApROvdiscZupxzyTD+mt2rZ7nQijJyDoMCcWfYkYUPk+GeBxG 8wGOkY1/0P7yyg+SFogfpe5+m2/obCJAehne/qX6wFNz1L5yJ0g4jGFDJbulNTmj54Kx Mn8OgvzOGlFL1xETLZX54STt7mPNnD1CfdHIuL2tG8NqIs/EqpqQPbYyWQFxdpclz8UO 0R2g== X-Gm-Message-State: AA+aEWbgtHOmubGtuYvBatI1wann8jGVj7JPWOmAIANrFY071/kKnvk9 z42XXieA1v1oItgxLPt72DPw4A== X-Google-Smtp-Source: AFSGD/UEl7nur5Lf8+x1IfUfB+dLXraLr3vsmNzVnx+fOl1hrR0JWjMnMRmCjVJs9X6ikJhAjhOfzA== X-Received: by 2002:ac8:1102:: with SMTP id c2mr14159106qtj.195.1545063467080; Mon, 17 Dec 2018 08:17:47 -0800 (PST) Received: from ovpn-120-55.rdu2.redhat.com (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id y32sm8885831qth.3.2018.12.17.08.17.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Dec 2018 08:17:46 -0800 (PST) From: Qian Cai To: yamada.masahiro@socionext.com, michal.lkml@markovi.net Cc: jpoimboe@redhat.com, mingo@kernel.org, bp@alien8.de, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Qian Cai Subject: [PATCH] kbuild: error for CONFIG_ORC_UNWINDER is too much Date: Mon, 17 Dec 2018 11:17:28 -0500 Message-Id: <20181217161728.6875-1-cai@lca.pw> X-Mailer: git-send-email 2.17.2 (Apple Git-113) In-Reply-To: <869bc700-1d6d-b950-76c7-5d0fc589152c@lca.pw> References: <869bc700-1d6d-b950-76c7-5d0fc589152c@lca.pw> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since ifdef will be evaluated immediately in the first phrase of the Makefile read-in, there is no guarantee that the value for CONFIG_ORC_UNWINDER will be up-to-date until in the second phrase that this recipe is ran. include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd $(Q)$(MAKE) -f $(srctree)/Makefile syncconfig Hence, change error to warning as this is essentially a best guess. The original bug can be reproduced this way, * make sure none of libelf-dev, libelf-devel or elfutils-libelf-devel installed. # make distclean * generate a default .config where CONFIG_UNWINDER_ORC is enabled by default. # make menuconfig (exit -> save) # grep CONFIG_UNWINDER_ORC .config CONFIG_UNWINDER_ORC=y # make menuconfig (deselect CONFIG_UNWINDER_ORC) # grep CONFIG_UNWINDER_ORC .config # CONFIG_UNWINDER_ORC is not set # make Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel # grep CONFIG_UNWINDER_ORC include/config/auto.conf CONFIG_UNWINDER_ORC=y Fixes: 3dd40cb320f (objtool: Upgrade libelf-devel warning to error for CONFIG_ORC_UNWINDER) Signed-off-by: Qian Cai --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 56d5270f22f8..eeb4ec49d393 100644 --- a/Makefile +++ b/Makefile @@ -963,7 +963,7 @@ ifdef CONFIG_STACK_VALIDATION objtool_target := tools/objtool FORCE else ifdef CONFIG_UNWINDER_ORC - $(error "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel") + $(warning "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel") else $(warning "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel") endif