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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,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 5F33FC43603 for ; Tue, 10 Dec 2019 21:22:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 308A1205C9 for ; Tue, 10 Dec 2019 21:22:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576012961; bh=I9352z0iCXVXtkWPBa/1Pa0m0mxbqm65/+V+ZPZCkZQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=DGozSlTaE0dqaZ5u4/i3V8v/MmcxEugi3+TOpeBPoXiNf5ArM6kwWRXNHmZPehN/W aeH2VMufoh1KxZYbkJetzIKM0siHH9D/qCB/u0vl2R9OsDfdt2IEgYus3g9K+JLzfD BaMH+VPD4oKcqQgP1IN+jEpwMHuj29SVrt6NXxGA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729183AbfLJVWk (ORCPT ); Tue, 10 Dec 2019 16:22:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:34158 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727237AbfLJVL1 (ORCPT ); Tue, 10 Dec 2019 16:11:27 -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 1ABAA246B5; Tue, 10 Dec 2019 21:11:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576012287; bh=I9352z0iCXVXtkWPBa/1Pa0m0mxbqm65/+V+ZPZCkZQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l473EK03KUfcAyZL7z1WJiQwruGd02ONuc43tV5lh0h0t3RIWaIN/ikR3h/znoDnR 7CtqRKxv1yQqFze4mXW0EP70ijviy3xtCA/cGO/QK2kyUcbXHrTJ7CxpGTwoXZnxgs fKtaflZTpwacSTb8Ms3jcvWUpWMxVk4wUIYf6MRw= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: 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 AUTOSEL 5.4 228/350] perf tools: Fix cross compile for ARM64 Date: Tue, 10 Dec 2019 16:05:33 -0500 Message-Id: <20191210210735.9077-189-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191210210735.9077-1-sashal@kernel.org> References: <20191210210735.9077-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review 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: 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 5df7889851305..8dfa3e5229f1b 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