libftdi Archives

Subject: How to cross-compile libftdi1 for ARM Linux target?

From: Anton Smirnov <dev@xxxxxxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Wed, 21 Aug 2013 11:15:37 +0600
I've used autotools to cross-compile libftdi-0.1 for ARM Linux:

export CPPFLAGS="-I/softdev/arm-libs/include/libusb"
export LDFLAGS="-L/softdev/arm-libs/lib"
./configure --build=x86-unknown-linux-gnu --host=arm-linux-androideabi --target=arm-linux-androideabi --prefix=/softdev/arm-libs

Now i'm going to do the same for libftdi1 and i was surprised that libftdi is now build with cmake.
After getting familiar with cmake and googling for a few hours i constructed build command for it which seems to be good for my purpose:

cmake -DCMAKE_INSTALL_PREFIX="/softdev/arm-libs" -DCMAKE_C_COMPILER="${CC}" -DCMAKE_CXX_COMPILER="${CXX}" -DCMAKE_CXX_FLAGS="${CPPFLAGS}" -DCMAKE_SYSTEM_NAME="Linux" -DLIBUSB_INCLUDE_DIR="/softdev/arm-libs/include/libusb" -DCMAKE_HOST_SYSTEM_NAME="Linux" -DCMAKE_FIND_ROOT_PATH="/softdev/arm-libs"  -G "Unix Makefiles" ..

So i'm getting error during "make":
arm-linux-androideabi-gcc: error: 2.0.0: No such file or directory
arm-linux-androideabi-gcc: error: 2.0.0: No such file or directory

cmake find compilers (c and c++) correctly, but does not use ARM libs for linker (still uses system paths).

What's wrong? Can it be cross-compiled in more simple way?
Libusb-1.0 is cross-compiled and is located in specified paths for sure.

Regards, Anton.
 


libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx


Current Thread