[Nut-upsuser] cross-compiling nut

Charles Lepple
Mon, 18 Jul 2011 11:15:32 -0000

On Jul 17, 2011, at 8:23 AM, Tilman Glotzner wrote:

> Hello,
>
> I would like to run nut 2.6.1 on an embeeded machine ( arm9 )
> running linux and uclibc. A working gcc tool chain came with the
> board.
> How can I compile and build nut using the cross compiler tool chain ?

Is the toolchain self-hosted? That is, can you run gcc on the board
itself? (IMHO that is usually the easiest way to cross-compile.)

> I know that this is not a very specific question. I have however
> little experience with cross compiling, and I wonder where to start.
> A logical point would be the configure script. It however does not
> find the cross compiler, and I have now idea how to tell the
> configure script where to look for the cross compiler....

It's probably easiest to help you if you copy-and-paste some error
messages that you are getting, because there are probably hundreds of
ways to do this. But here's how to cross-compile NUT for Win32:

    ./configure --host=i586-mingw32msvc

The "i586-mingw32msvc" string is the prefix for the cross-compiler.
You might have a file like "arm9-eabi-none-gcc" (which should be
somewhere in $PATH), so in that case I think you would use "--
host=arm9-eabi-none".

--
Charles Lepple