Кросс платформенная компиляция Linux

sudo apt-get install gcc make gcc-arm-linux-gnueabi binutils-arm-linux-gnueabi
#include
int main()
{
        printf("Hello World!\n");
        return 0;
}
$ arm-linux-gnueabi-gcc helloworld.c -o helloworld-arm -static
$ file helloworld-arm
helloworld-arm: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=1aec53a65fdd71ec68e761b5ef4cd2fae6e4e75c, not stripped
#v1 static bin
$ sudo ./configure --build x86_64-pc-linux-gnu --host arm-linux-gnueabi LDFLAGS="-static"
$ sudo make install

#--build - platform FROM compile
#--host - platform TO compile

Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

#v2 with lib
$ sudo ./configure --build x86_64-pc-linux-gnu --host arm-linux-gnueabi --prefix=/home/devsrv/test/compile/sec --exec-prefix=/home/devsrv/test/compilefi
$ sudo make install

make clean