Hi,
I'm sorry to have woken up a rather sleeping thread. But I'm facing a similar issue.
I'm pretty new to linux, especially the cross compiling stuff.
I'm trying to cross compile oprofile for ARM cortex A8, using the codesourcery toolchain.
I'm pretty much following the steps mentioned in the link:
http://old.nabble.com/cross-compilin...d19438124.html
oprofile is dependent on the popt and binutils/libiberty library, so here is the steps I follow as mentioned in the link above:
1. Cross compile the popt libraries.
cd popt-1.14
mkdir arm
POPT=$PWD
cd arm
../configure --host=arm-none-linux-gnueabi
make
2. Cross compile the binutils libraries.
cd binutils-2.12
mkdir arm
BINUTILS=$PWD
cd arm
../configure --build=x86-none-linux-gnu --host=arm-none-linux-gnueabi
make
3. Cross compile the oprofile binaries, which includes the libraries compiled in the above two steps,
cd oprofile-0.9.7
mkdir arm
cd arm
../configure --host=arm-none-linux-gnueabi \
--with-kernel-support \
--with-extra-libs=$POPT/arm/.libs:$BINUTILS/arm/bfd/.libs \
--with-extra-includes=$POPT:$BINUTILS/arm/bfd:$BINUTILS/bfd:$BINUTILS/include \
CC=/opt/cgt_a8/arm-2009q1/bin/arm-none-linux-gnueabi-gcc \
CXX=/opt/cgt_a8/arm-2009q1/bin/arm-none-linux-gnueabi-g++ \
CPP=/opt/cgt_a8/arm-2009q1/bin/arm-none-linux-gnueabi-cpp \
AR=/opt/cgt_a8/arm-2009q1/bin/arm-none-linux-gnueabi-ar \
STRIP=/opt/cgt_a8/arm-2009q1/bin/arm-none-linux-gnueabi-strip \
AS=/opt/cgt_a8/arm-2009q1/bin/arm-none-linux-gnueabi-as \
RANLIB=/opt/cgt_a8/arm-2009q1/bin/arm-none-linux-gnueabi-ranlib
but when I try to make after this particular configuration, I hit an issue:
config.status: executing default-1 commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
make[2]: Entering directory `/home/asif/binutils-2.22/arm/binutils'
if [ -r sysinfo.c ]; then \
gcc -c -I. -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow sysinfo.c ; \
else \
gcc -c -I. -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow ../../binutils/sysinfo.c ; \
fi
/usr/local/bin/as: 1: Syntax error: word unexpected (expecting ")")
Few lines from the config.log indicating the error
configure:12789: /opt/cgt_a8/arm-2009q1/bin/arm-none-linux-gnueabi-gcc -c -g -O2 conftest.c >&5
configure:12789: $? = 0
configure:12804: result: 4
configure:12858: checking for build system executable suffix
/usr/local/bin/as: 1: Syntax error: word unexpected (expecting ")")
Please let me know if you need any more clarifications, early help would be much appriciated.