I've been experimenting with cross-compiling ScummVM for my OpenPandora. I got it working, but it was not as straightforward as I'd hoped. Here is a small summary how.
1. Install a cross-compiler. I used the install script from here and updated it to download CodeSourcery 2013.11 (gcc-4.8.1):
https://pyra-handheld.com/boards/thread ... pks.65592/
Make sure the cross-compiler tools are in the PATH.
2. Checkout the sources
Code: Select all
git clone --depth 1 https://github.com/scummvm/scummvm
Code: Select all
diff --git a/configure b/configure
index cd79adfce6..2a9e132be5 100755
--- a/configure
+++ b/configure
@@ -1547,7 +1547,7 @@ neuros)
openpandora)
_host_os=linux
_host_cpu=arm
- _host_alias=arm-angstrom-linux-gnueabi
+ _host_alias=arm-none-linux-gnueabi
;;
ppc-amigaos)
_host_os=amigaos
Code: Select all
CXXFLAGS="-isystem ${PNDSDK}/usr/include" CC=arm-none-linux-gnueabi-gcc LD=arm-none-linux-gnueabi-ld AS=arm-none-linux-gnueabi-as CXX=arm-none-linux-gnueabi-g++ ./configure --backend=openpandora --host=openpandora --enable-c++11 --with-sdl-prefix=${PNDSDK}/usr --disable-debug --enable-release --enable-optimizations --opengl-mode=any --with-alsa-prefix=${PNDSDK}/usr --with-ogg-prefix=${PNDSDK}/usr --with-vorbis-prefix=${PNDSDK}/usr --with-mad-prefix=${PNDSDK}/usr --with-zlib-prefix=${PNDSDK}/usr --with-jpeg-prefix=${PNDSDK}/usr --with-png-prefix=${PNDSDK}/usr --with-theoradec-prefix=${PNDSDK}/usr --with-freetype2-prefix=${PNDSDK}/usr --with-faad-prefix=${PNDSDK}/usr
Code: Select all
make -j9
This seemed way more complicated than I thought.
The CXXFLAGS was needed to get rid of a torrent of compiler warnings about redefined defines (if that makes sense).
I tried specifying --host=arm-none-linux-gnueabi to the configure script but then I had to build it with
Code: Select all
make AS=arm-none-linux-gnueabi-as
Am I doing it wrong?