From patchwork Thu Nov 7 18:59:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 178818 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp1482162ilf; Thu, 7 Nov 2019 11:06:52 -0800 (PST) X-Google-Smtp-Source: APXvYqy4l0Rm+QwnGR9HRS8Wn7PrKsgMGoMvUKZ9FAlJICbfsFLZhvfrOygE+jRHv5dEH5kjfMFX X-Received: by 2002:a17:907:2078:: with SMTP id qp24mr4651188ejb.157.1573153607380; Thu, 07 Nov 2019 11:06:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573153607; cv=none; d=google.com; s=arc-20160816; b=edpUPPeDokDNB0hs4OIswLCayzlgymnPjzXB8H2xcN0n9XPecoNR1bQSjOApMPFWOF DjO2ZcJeGgvfzBuN1Gf9CJz+zhQZHtI8Xcq78YIaPaqevmBcmVDwmArBuFbjbT6gJa41 PhB0sltwP2tvV+PRe2c2VgpomZ+Ez9BuBPFgSh1ESCcSSIIty/+n/DDxhC2uELKyTBXP rw3Ub5SUehsPdGy7IPbuhf6oPOr3MD4YiXXU2PSws82D0jr2e038WH+yjGmlj7GOEPL3 LklCP+54z5h0PCfXOa0Ya3PFVA2bIifL9qU2bjpJt89CnnJ0OKBuzd58hUsoUzJQabyL seWA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rC8O4jWDmGZq7Gx25apivE3xeFfHAg6VR36H1gGJCy4=; b=ZKosUjhDyf2K1rK92QQ+tn/TeLwSSB49r4Soqa0b74/yyNrG5NAaBYaZ1NRJ2wnoCu FGUcHh5a2mTGFyXVIMxLVyaUHnYoCYScHba3BY4pLLeX5RrVn5mjO4E6OGckz9DFVpzI Qz+QOCMU983cQqL5vuLxrLqM9firKuYZH7kzw0C7J+67+I8owI2cmt0/9JyXgIAlxkO2 vj+6BiJ0qoMHHxnVa5wi2O0MhlAYuO3yjuOIoS9PFrWHFTq8Npg7Nfey/LEYPbCcEXdV LZEjLsD0nBX7XFbL5YNoReHeNrISExDIkodvURq8jYVcjzFctSAqzb4q1ZufCWKmK6Ht V7QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qvS7IjMt; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p5si2132854eja.141.2019.11.07.11.06.39; Thu, 07 Nov 2019 11:06:47 -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=qvS7IjMt; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730512AbfKGTGa (ORCPT + 26 others); Thu, 7 Nov 2019 14:06:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:44712 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727352AbfKGTG3 (ORCPT ); Thu, 7 Nov 2019 14:06:29 -0500 Received: from quaco.ghostprotocols.net (179-240-172-58.3g.claro.net.br [179.240.172.58]) (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 7C4C8222C6; Thu, 7 Nov 2019 19:06:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573153588; bh=obswrDG1ZxfUiXZJ7jUiqEfLNTSGT592OfqCFlY8FxQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qvS7IjMt1UP18lkoUCiTLu6F5DzUcHkUBA23zt5nCPQnqNnJhJzlr7x6Lzm6rE/yw 1sCqMle/1ZDQaGyDr/v0m72IDQklPDiJqZqMVsLkyKZU5XSM6RHdhpc2dEZQmgEuhW W/9qe98+6CnP4b1vTd5uYfKRb0+MUzHp4ziFQuUI= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, John Garry , Alexander Shishkin , Jiri Olsa , Mark Rutland , Peter Zijlstra , Will Deacon , linux-arm-kernel@lists.infradead.org, Arnaldo Carvalho de Melo Subject: [PATCH 39/63] perf tools: Fix cross compile for ARM64 Date: Thu, 7 Nov 2019 15:59:47 -0300 Message-Id: <20191107190011.23924-40-acme@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191107190011.23924-1-acme@kernel.org> References: <20191107190011.23924-1-acme@kernel.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: John Garry 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 --- tools/perf/arch/arm64/util/sym-handling.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.21.0 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 ||