2009年12月3日 星期四

Linux Development - Cross Compilation

Q. How to compile the libpcap in the linux x86 enviroment for the ARM target?

>> Before compile the package. We need to setup the related tools as the cross compiler toolchain tools as following.
# set | grep arm
AR=arm-linux-uclibc-ar
AS=arm-linux-uclibc-as
BUILD='-Os -mtune=arm9e -march=armv5te'
CC=arm-linux-uclibc-gcc
CROSS_TARGET=arm-linux-uclibc
CXX=arm-linux-uclibc-g++
LD=arm-linux-uclibc-ld
RANLIB=arm-linux-uclibc-ranlib
READELF=arm-linux-uclibc-readelf
STRIP=arm-linux-uclibc-strip


# ac_cv_linux_vers=2 ./configure --host=arm --build=arm-linux --prefix=/usr/local/libpcap

How to instruct the configure to build the crosscompile code version of iperf
For example of ARM device target
# ./configure --host="armeb-linux" --enable-debuginfo --prefix=/pat/prefix

沒有留言: