I saw no issues with 4.9 / 5.3 - build broke with 6.2 until I added this patch.
Mike

On 16 March 2017 at 14:24, Mathieu Poirier <mathieu.poirier@linaro.org> wrote:
On 15 March 2017 at 20:27, Kim Phillips <kim.phillips@arm.com> wrote:
> Needed to build arm64 perf with at least gcc 6.2, otherwise get:

Interesting...

On my side I can compile the perf tools both natively and
cross-compiled without problem.  The version I use are a follow:

Natively: aarch64-linux-gnu-gcc (Linaro GCC 5.3-2016.05-rc2) 5.3.1 20160412
x-compiled: gcc (Debian/Linaro 4.9.2-10) 4.9.2

Mathieu


>
> util/cs-etm.c:1466:27: error: ‘cs_etm_global_header_fmts’ defined but not used [-Werror=unused-const-variable=]
>  static const char * const cs_etm_global_header_fmts[] = {
>                            ^~~~~~~~~~~~~~~~~~~~~~~~~
>
> Signed-off-by: Kim Phillips <kim.phillips@arm.com>
> ---
>  tools/perf/util/cs-etm.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
> index 70825e7..5ff3c3e 100644
> --- a/tools/perf/util/cs-etm.c
> +++ b/tools/perf/util/cs-etm.c
> @@ -1463,12 +1463,6 @@ static int cs_etm__process_auxtrace_event(struct perf_session *session,
>
>  }
>
> -static const char * const cs_etm_global_header_fmts[] = {
> -  [CS_HEADER_VERSION_0]    = "   Header version                 %"PRIx64"\n",
> -  [CS_PMU_TYPE_CPUS]       = "   PMU type/num cpus              %"PRIx64"\n",
> -  [CS_ETM_SNAPSHOT]        = "   Snapshot                       %"PRIx64"\n",
> -};
> -
>  static const char * const cs_etm_priv_fmts[] = {
>    [CS_ETM_MAGIC]           = "   Magic number                   %"PRIx64"\n",
>    [CS_ETM_CPU]             = "   CPU                            %"PRIx64"\n",
> --
> 2.10.2
>



--
Mike Leach
Principal Engineer, ARM Ltd.
Blackburn Design Centre. UK