Crosscompile

From DaphneWiki

Jump to: navigation, search

Contents

Cross compiling

To build toolchain for raspberry pi, go here: http://www.bootc.net/archives/2012/05/26/how-to-build-a-cross-compiler-for-your-raspberry-pi/

Make sure to enable C++ (his instructions omit that part).

Generic (works on most source packages)

CC=arm-unknown-linux-gnueabi-gcc ./configure --prefix={pathtoyourxtools}/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi --host=arm

make

make install

mpolib

CC=arm-unknown-linux-gnueabi-gcc ./configure CPPFLAGS=-I/home/matt/x-tools/arm-unknown-linux-gnueabi/include LDFLAGS=-L/home/matt/x-tools/arm-unknown-linux-gnueabi/lib --prefix=/home/matt/x-tools/arm-unknown-linux-gnueabi --host=arm

Zlib v1.2.7

The configure command is:

CHOST=arm-unknown-linux-gnueabi ./configure --prefix={sameasgeneric}

(ignore the error you get at the end)

then

make make install

expat v2.1.0

generic

jansson

generic

OpenSSL v1.0.1c

export cross=arm-unknown-linux-gnueabi-

./Configure dist threads -D_REENTRANT --prefix={same as generic}

make CC="${cross}gcc" AR="${cross}ar r" RANLIB="${cross}ranlib"

For mingw32 (running on linux, building win32 binaries)

Read the INSTALL.W32 file and search for "cross-compile" in those instructions.

libogg v1.2.0

generic

libusb v0.1.12/v1.0.9

Same as generic except "--host=arm-unknown-linux-gnueabi"

NOTE: libFTDI is built against the v0.1 API, not the v1.0 API.

libvorbis v1.3.1

generic

gmock v1.5.0

CC=arm-unknown-linux-gnueabi-gcc CXX=arm-unknown-linux-gnueabi-g++ ./configure --prefix={sameasgeneric} --host=arm

wxWidgets (on linux, targetting win32)

./configure --prefix={whatever} --host=i686-w64-mingw32 --build=i686-linux --your_optional_switches

Personal tools