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=-13.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 0D55EC43387 for ; Fri, 11 Jan 2019 14:51:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D4750206B6 for ; Fri, 11 Jan 2019 14:51:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547218317; bh=ik5NYXc0m6lbGkDMoAKmSj+J47v+3eIM08RZpKdcyKw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=PL/laQqcN28/sFvEWwPNpS20K9sAhzo1upsQQNwzqB1pLrL/gPhQAqulELWKSH+FX eYFifDe7pIwQDXbsaS9gaHQDMZsseby6W3n8fmJQji9mh4vyfmUZ7l038ek7F/uWiZ w76JhKFp+4SZzj4kr0q+zAHF9KkKDTcm4rInr4Bs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403801AbfAKOjV (ORCPT ); Fri, 11 Jan 2019 09:39:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:60130 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403796AbfAKOjU (ORCPT ); Fri, 11 Jan 2019 09:39:20 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 A7BE8206B6; Fri, 11 Jan 2019 14:39:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547217560; bh=ik5NYXc0m6lbGkDMoAKmSj+J47v+3eIM08RZpKdcyKw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v1MtI2xgbCjABH2cdKlDONylJwLVKe0ofzBcDfO1AxlvG10jjOzqvcJn1ysrfQuqe whiYHObj+7hBbK73JO8qkBKrWZZr8sDL8YrRSX1WwVKnZIX8Hzgj19BlcHoRoVl3ac lnXpdSGBbTgVZQHSc3C6d+bktvqRJ4fyXBWq5J6M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Gortmaker , Bernd Edlinger , Qian Cai , Josh Poimboeuf , Masahiro Yamada , Sasha Levin Subject: [PATCH 4.19 067/148] kbuild: fix false positive warning/error about missing libelf Date: Fri, 11 Jan 2019 15:14:05 +0100 Message-Id: <20190111131116.927783335@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190111131114.337122649@linuxfoundation.org> References: <20190111131114.337122649@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ 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 3324dd0e11a3..8e6408acf50b 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