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=-9.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, 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 ED132C43387 for ; Wed, 26 Dec 2018 22:39:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B84D92054F for ; Wed, 26 Dec 2018 22:39:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545863984; bh=+AGIJDS56ehtcTaiOjSMP93xAh14CUEQxrHoh0BPjjk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=AOonZS3LvnOxQdZVDxFsuE/RSa33s47TX3suMNrwX51V3m5nJdu6sjvU9C+184k2U it1CkkrnCFGB01L0Xh4KoX3xup1bGfvgE+RNCMsnpSPSv8iNefXTm5dj4Aca2NDZXC /eIKgTAZauE8vGjdXUe4gB+7k4luLBDJhXGzTpSI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728791AbeLZWi1 (ORCPT ); Wed, 26 Dec 2018 17:38:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:38514 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728724AbeLZWiP (ORCPT ); Wed, 26 Dec 2018 17:38:15 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4E5A32054F; Wed, 26 Dec 2018 22:38:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545863895; bh=+AGIJDS56ehtcTaiOjSMP93xAh14CUEQxrHoh0BPjjk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g8AywyqG9PaVxpPJrs3KYz5AIGRBQfX73oX6NwUxfudCAGGeAIPFwR6Z8/dauRdFi pfygfkTqx+Y4LdsrBn/KdnoY4phRlU+KDSW+zkWL14ejLLL2zQ95GzRbUqVxGnx5Cb OxYRHtF4yvhSV3GKbOCTOhmGwEuqz00ah1xesQVs= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Masahiro Yamada , Josh Poimboeuf , Sasha Levin , linux-kbuild@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 82/97] kbuild: fix false positive warning/error about missing libelf Date: Wed, 26 Dec 2018 17:35:42 -0500 Message-Id: <20181226223557.149329-82-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181226223557.149329-1-sashal@kernel.org> References: <20181226223557.149329-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masahiro Yamada [ Upstream commit ef7cfd00b2caf6edeb7f169682b64be2d0a798cf ] For the same reason as commit 25896d073d8a ("x86/build: Fix compiler support check for CONFIG_RETPOLINE"), you cannot put this $(error ...) into the parse stage of the top Makefile. Perhaps I'd propose a more sophisticated solution later, but this is the best I can do for now. Link: https://lkml.org/lkml/2017/12/25/211 Reported-by: Paul Gortmaker Reported-by: Bernd Edlinger Reported-by: Qian Cai Cc: Josh Poimboeuf Signed-off-by: Masahiro Yamada Tested-by: Qian Cai Signed-off-by: Sasha Levin --- Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 9770f29a690a..b64adbc154e4 100644 --- a/Makefile +++ b/Makefile @@ -954,11 +954,6 @@ ifdef CONFIG_STACK_VALIDATION ifeq ($(has_libelf),1) 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") - else - $(warning "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel") - endif SKIP_STACK_VALIDATION := 1 export SKIP_STACK_VALIDATION endif @@ -1115,6 +1110,14 @@ uapi-asm-generic: PHONY += prepare-objtool prepare-objtool: $(objtool_target) +ifeq ($(SKIP_STACK_VALIDATION),1) +ifdef CONFIG_UNWINDER_ORC + @echo "error: Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel" >&2 + @false +else + @echo "warning: Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel" >&2 +endif +endif # Generate some files # --------------------------------------------------------------------------- -- 2.19.1