Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13474486ybl; Sun, 29 Dec 2019 12:47:15 -0800 (PST) X-Google-Smtp-Source: APXvYqy/tWRrCLvFZ2AbDjO3uyDK1XC40s/VNPZdzRzJZEuP5LcZT6p0q/RtXj63lw6u0ssveviQ X-Received: by 2002:a05:6830:20d3:: with SMTP id z19mr66006400otq.330.1577652435631; Sun, 29 Dec 2019 12:47:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577652435; cv=none; d=google.com; s=arc-20160816; b=vFLi4jXfmD0iWSQUYOzg+ZmTIgQ9xcKWyrYI/zKc132WlWNwunpBHT2WwolfgrbnV9 7Yyke+lTzzhpPUwkcxHqXHDTWihcQ0zH4gQ74gWbZIhKfbbiZS3YVujEEBBDtuhGKdn+ xEHHlE4ieru+PV+QtwUsccRPMB0Dd2fRZ3zPgTvz8jOnYufJ01b+pT1LYCwGcmiA4pDz 74RyPtCeqT9oo668dIlPgmiA+P+px9Ld+V0oxTIPzlGdzEjkNqSlbTAXU+Bf33n+3BNv 8J/uKlNECkb7oU4jxF9k8Smd1u+coQABJMtK1I2CIci4TXCk5RQUJlI/r4oMG3hv9A11 ylEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7nrUu4QdJLZTowqdlnc9YF2HI86DTj5hgisc7li7r0M=; b=K9O9qAUEX9vZh4SoaCZ1DZlDpgLJ4/JflzRFJ2CmbDgj1Ts8keI+bhXJVu7KwhRIWP NbKTcxdWw/Y0pM0gO3J8iJW0rhfTFC5Hl4S7WRtAAePLrrv5nH4dPh7bnb8lIRDw7zC8 ehxMpgl7EuK6wAVNYQPFRUEpwf1HbXzxHj7vd0mjzot9jCmd/ycfu7GXs+89nexQAO6M UzfC87M1A6XM4f+w0Q76NQi59nCDr+mqsbkbsDj9s0LwZjUWyNTV1Po9tpUuTo9ujJct 1bfauwb7JwAt1xzibMEPOO+uVkDzQ38Uaeys9QWaSZxvzjXaIydkZfAaNfX7TloCp+1n dzVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1tAF5pXJ; 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 y14si21605009otk.237.2019.12.29.12.47.05; Sun, 29 Dec 2019 12:47:15 -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; dkim=pass header.i=@kernel.org header.s=default header.b=1tAF5pXJ; 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 S1731515AbfL2Rvb (ORCPT + 99 others); Sun, 29 Dec 2019 12:51:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:36810 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731771AbfL2Rv2 (ORCPT ); Sun, 29 Dec 2019 12:51:28 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 6C21820718; Sun, 29 Dec 2019 17:51:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641887; bh=xlc7THDxqHOy7omFyY3ozdfR6uXdFyOw7hRsO3wCTyQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1tAF5pXJqwcjxBkfp6g0F4nneIQcSRUirygO0C+BqikVjkQytsOy61Mi8LRf1bxp7 Bd9KNRztvlOnHcabRnPzEVn0DctZmn6D5XPyp4rMRFgzn53bPferUhcRP3aWHn0ztu rjdTpq+z/+9hBjh5UzZXETsDEosJzNRLK0HgYU00= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, John Garry , Alexander Shishkin , Jiri Olsa , Mark Rutland , Namhyung Kim , Peter Zijlstra , Will Deacon , linux-arm-kernel@lists.infradead.org, Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 5.4 253/434] perf tools: Fix cross compile for ARM64 Date: Sun, 29 Dec 2019 18:25:06 +0100 Message-Id: <20191229172718.726560429@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: John Garry [ Upstream commit 71f699078b154fcb1c9162fd0208ada9ce532ffc ] Currently when cross compiling perf tool for ARM64 on my x86 machine I get this error: arch/arm64/util/sym-handling.c:9:10: fatal error: gelf.h: No such file or directory #include For the build, libelf is reported off: Auto-detecting system features: ... ... libelf: [ OFF ] Indeed, test-libelf is not built successfully: more ./build/feature/test-libelf.make.output test-libelf.c:2:10: fatal error: libelf.h: No such file or directory #include ^~~~~~~~~~ compilation terminated. I have no such problems natively compiling on ARM64, and I did not previously have this issue for cross compiling. Fix by relocating the gelf.h include. Signed-off-by: John Garry Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/1573045254-39833-1-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/arch/arm64/util/sym-handling.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/arch/arm64/util/sym-handling.c b/tools/perf/arch/arm64/util/sym-handling.c index 5df788985130..8dfa3e5229f1 100644 --- a/tools/perf/arch/arm64/util/sym-handling.c +++ b/tools/perf/arch/arm64/util/sym-handling.c @@ -6,9 +6,10 @@ #include "symbol.h" // for the elf__needs_adjust_symbols() prototype #include -#include #ifdef HAVE_LIBELF_SUPPORT +#include + bool elf__needs_adjust_symbols(GElf_Ehdr ehdr) { return ehdr.e_type == ET_EXEC || -- 2.20.1