On Wed, Jul 11, 2012 at 12:49 PM, Igor Zhbanov <i.zhbanov(a)samsung.com> wrote:
It was impossible to build PowerTOP for ARM with a cross-compiler
because PowerTOP uses internal csstoh utility that converts
powertop.css to powertoh.h for inclusion in *.cpp source files.
When you use the cross-compiler (without making complicated rules
in the Makefile) this utility will be compiled for ARM platform too.
And you cannot run it on x86 build host.
To solve this issue I have rewritten it in a shell script.
So, while this approach is correct, it's a clear case where basically
autotools is not used properly and should be able to solve the problem
for you, and this tool cuold remain a binary program.
In this case it's probably not worth it, since the program is so
small, but I'd like for everyone to realize that there is a lot of
support in autotools for using HOSTCC and building _noinst programs
etc. - autotools has excellent crosscompilation support.
Auke