[meta-freescale] [meta-fsl-arm][PATCH] linux-imx: Add a patch to fix perf compilation issue.

Ahsan, Noor Noor_Ahsan at mentor.com
Tue Dec 18 23:58:15 PST 2012


Thanks for your input. I'll send another patch. In order to reproduce it you need to build perf not linux-imx.


-----Original Message-----
From: otavio.salvador at gmail.com [mailto:otavio.salvador at gmail.com] On Behalf Of Otavio Salvador
Sent: Tuesday, December 18, 2012 9:09 PM
To: Ahsan, Noor
Cc: meta-freescale at yoctoproject.org
Subject: Re: [meta-freescale] [meta-fsl-arm][PATCH] linux-imx: Add a patch to fix perf compilation issue.

On Tue, Dec 18, 2012 at 11:59 AM, Noor, Ahsan <noor_ahsan at mentor.com> wrote:
> From: Noor Ahsan <noor_ahsan at mentor.com>
> * Perf build fails with GNU C library version 2.16. It give undefined 
> reference for RUSAGE_SELF and storage size of 'ru'
>  in builtin-sched.c.
> * Fixed issue by adding time.h and resource.h headerfiles in builtin-sched.c.
> Signed-off-by: Noor Ahsan <noor_ahsan at mentor.com>

Checking the kernel sources it seems the only required header is resource.h, as stated in:

commit 7b78f13603c6fcb64e020a0bbe31a651ea2b657b
Author: Markus Trippelsdorf <markus at trippelsdorf.de>
Date:   Wed Apr 4 10:45:27 2012 +0200

    perf tools: Fix getrusage() related build failure on glibc trunk

    On a system running glibc trunk perf doesn't build:

        CC builtin-sched.o
    builtin-sched.c: In function 'get_cpu_usage_nsec_parent':
builtin-sched.c:399:16: error: storage

    Fix it by including sys/resource.h.

    Signed-off-by: Markus Trippelsdorf <markus at trippelsdorf.de>
    Cc: Peter Zijlstra <a.p.zijlstra at chello.nl>
    Link: http://lkml.kernel.org/r/20120404084527.GA294@x4
    Signed-off-by: Ingo Molnar <mingo at kernel.org>

Please use this patch, add a Upstream-Status header in the patch and also bump PR.


Otavio Salvador                             O.S. Systems
E-mail: otavio at ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

More information about the meta-freescale mailing list