On Mon, Jul 2, 2012 at 9:10 PM, Maynard Johnson <maynardj@us.ibm.com> wrote:
On 06/15/2012 01:55 PM, Maynard Johnson wrote:
> On 06/15/2012 09:48 AM, Gergely Kis wrote:
>> Hello,
>>
>>
>> On Fri, Jun 15, 2012 at 12:07 PM, Will Deacon <will.deacon@arm.com <mailto:will.deacon@arm.com>> wrote:
>> We also saw that oprofile does not cross-compile nicely, and planned to fix it, if someone else doesn't fix it first.
> A patch would be much appreciated.

Gergely, Will,
Have either of you come up with a fix to make the perf-events-based oprofile "cross-compile nicely" (e.g. a --with-perf-events option)?  I would try myself, but cross-compiling is not something I have expertise with.

Maynard,

Sorry, I just saw your mail, and your patch. We have a patch in the works, but we were not ready to publish it just yet, because there were some linker issues with it with some toolchains.

Our approach is a bit different: we added a switch called --with-kernel, which (as you probably guessed) specifies the kernel source root directory. This way the a AX_KERNEL_VERSION macro will use this kernel version, instead of the default one. Of course, the check for the perf_event.h would use this directory also.

We will try to clean up the patch today, and send it in as a proposal.

Best Regards,
Gergely