From patchwork Fri Feb 23 14:22:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Jarry X-Patchwork-Id: 10237867 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5F3F0602DC for ; Fri, 23 Feb 2018 14:23:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4DC5629593 for ; Fri, 23 Feb 2018 14:23:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4245729637; Fri, 23 Feb 2018 14:23:18 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 C3EB929593 for ; Fri, 23 Feb 2018 14:23:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751541AbeBWOXD (ORCPT ); Fri, 23 Feb 2018 09:23:03 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:38420 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751381AbeBWOXB (ORCPT ); Fri, 23 Feb 2018 09:23:01 -0500 Received: by mail-wr0-f193.google.com with SMTP id n7so14295459wrn.5 for ; Fri, 23 Feb 2018 06:23:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=BqHntaE1z2mpEYDjLxqP+KjZ+I/9+c+3tlqK2Xubh4Q=; b=FTUNo2yRzMohoFVP3qqdQaluZWOIACZN0V7dhm+gxk1utH6JUoKukzVMcgg9y55MgK GePt2ycNUgpimKrYKunccISn2XadI6GZxQPrxM5jkijymGbnb6UMmjGCIjxa0izlGqeB mWNvzr1XpOJjtdQ7PFSHFaikyPsNTSgbZn0mScYQILFsHqxmpsZFXX9Ybr/efCHtQ6Cm cI+WBAHt5k2g36yKINYZxr7Jw8grYBpZrLQDheDvL9QGVOLKxDur5hWcvi6AgrWPFxMh QtnNxCBrlUG882HgYM2SiE9iRiNANkdcfeWoRDMNLdzysWVeXUtsVXlokFP5S7czGbXp g/sA== 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:in-reply-to:references; bh=BqHntaE1z2mpEYDjLxqP+KjZ+I/9+c+3tlqK2Xubh4Q=; b=AFFp+ujBLXvq57HKHCmTcfsIrzI01hJc89fmXN0bQvpVsXoaMqWtfuxR3bRiTouhMn nLx1xF9oAelgHNzgyfeywq0RlrPv8W6uKw/TifIxdVuyOwAbPP6FnhA+ud1Os80h4eJk 6qPmJJ1gnyE0U/ZAK3ZvGAD4J7dsmcQqPoS5ocjBaRAxsLJUkMO3Cm2ixVZUn4r6tsf8 qf8kFuvtAVVcrF9kbr9y0648TGBdaUlS+xTpDuTRhHVODhmqIL6zoGE80RhxZqMkaeh4 T4ekZ3cUAd9G2J0lmuEeaReDbim3i13yhlYqcGTBLlo6ClNmonUz9zVcIPXRXQJUAfBj AEdw== X-Gm-Message-State: APf1xPAPEb6xCq041hTkAoqwMumVbmob4h9CKCp3zytd8SJWM1O45+pO Ai932NzOfUKqcYUySYMylliSg7Qp X-Google-Smtp-Source: AH8x225IlZuStT1w2j9+9agj5FYOdZiFuiQlNFFpxj7XHRHX/Zjy5aHqizHfI2G9TYUwPyGGAQzHkQ== X-Received: by 10.223.150.42 with SMTP id b39mr1728196wra.55.1519395779992; Fri, 23 Feb 2018 06:22:59 -0800 (PST) Received: from tom.dev.6wind.com. (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id p60sm2915761wrc.88.2018.02.23.06.22.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Feb 2018 06:22:58 -0800 (PST) From: Robin Jarry To: Masahiro Yamada , Michal Marek Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Poimboeuf , Ingo Molnar Subject: [PATCH 2/2] objtool: use host flags to detect if libelf is missing Date: Fri, 23 Feb 2018 15:22:15 +0100 Message-Id: <2afbfc7911a0eb0642c33e8c2582f137a4fda2f3.1519393674.git.robin.jarry@6wind.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: 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 When libelf headers and libs are not found and CONFIG_UNWINDER_ORC is selected, there is a make error introduced by commit 3dd40cb320fe ("objtool: Upgrade libelf-devel warning to error for CONFIG_ORC_UNWINDER"). Host headers and libs may be in a non-standard location and the check is performed without host flags. Make sure to use host flags for the check (they will be used later when building objtool anyway). Fixes: 3b27a0c85d70 ("objtool: Detect and warn if libelf is missing and don't break the build") Signed-off-by: Robin Jarry Cc: Josh Poimboeuf Cc: Ingo Molnar --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e9609319d2b8..4e8c667b9f3f 100644 --- a/Makefile +++ b/Makefile @@ -955,7 +955,7 @@ export mod_sign_cmd ifdef CONFIG_STACK_VALIDATION has_libelf := $(call try-run,\ - echo "int main() {}" | $(HOSTCC) -xc -o /dev/null -lelf -,1,0) + echo "int main() {}" | $(HOSTCC) $(host_clfags) $(HOSTLDFLAGS) -xc -o /dev/null -lelf -,1,0) ifeq ($(has_libelf),1) objtool_target := tools/objtool FORCE else