My Tech notes: Howto Build For x86 Host With Arm-Linux Target

Unix Documentation

Free Online Unix Training Materials

Lists many links to free Unix training materials.

Pointers and Arrays Materials

Pointers and Arrays materials Explained for C beginners

C FAQ and General Questions C Interview Questions

Powered By

Free XML Skins for Blogger

Powered by Blogger

Monday, October 6, 2008

Howto Build For x86 Host With Arm-Linux Target

How to Build For x86 Host With Arm-Linux Target?
I need to build the source code for ARM-Linux target board, I just taken the source code untar it and executed make, just to check it compiles or not.
Now Need to compile it for ARM target,
so I was using
$ ./configure --host=arm-linux-gcc --build=i686 --target=arm-linux-gcc
$ make
but it was not compiling for arm-linux-gcc as while compiling it compiles with gcc option and not with arm-linux-gcc

so You need to export the arm-gcc path before running ./configure.
For example:
$export CC=${arm-compiler-path}/arm-gcc
$configure --target=arm-linux

Still no luck to get the arm compiled binary.
As I compiled using make initially and that time it created ./config.cache file This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs.

You need to delete this file ./config.cache and run again
$./configure --host=arm-linux-gcc --build=i686 --target=arm-linux-gcc

It works Enjoy.

No comments:

Post a Comment