# Cross Configuring

To cross configure and compile &app;, begin by building a target system on your workstation. This includes cross compilers for the target architecture, and some system headers. You will also need to cross compile all the dependencies normally needed to build Gnash. This can on occasion be a daunting process, as not all libraries will cross configure and cross compile. There is more information about cross compiling all the dependant packages on the http://www.gnashdev.org web site.

If you need to build your own tool chain, that is beyond the scope of this manual. There are various resources on the web for howto's on building GCC based cross toolchains. Two popular sites are http://frank.harvard.edu/~coldwell/toolchain/ and http://www.kegel.com/crosstool/. This can also be a very time consuming and frustrating process, even for experienced developers.

Because the process of building your own cross tool chain can be harder than one may wish, there are several other cross development environments that simulate a native environment to make it easier to develop. These also let you develop for both native and cross builds. Several popular ones are Access Linux Platform, Scratchbox, Open Embedded, Maemo.

To build for an ARM based system on an x86 based systems, configure like this using the traditional style cross toolchain, configure like this:

        ../../gnash/configure --build=i686-pc-linux-gnu
        --host=arm-linux --prefix=/usr/local/arm/oe --disable-nsapi
        --disable-kparts --enable-gui=fb --enable-renderer=agg
        --disable-shared --disable-menus

The important configuration options are the ones which specify the architecture for the build:

--target

  The target architecture, where the final executables are expected to run.

--host

  The host architecture, where the executables are expected to run. Usually this is the same as the --target, except when building a compiler as a Canadian Cross. In this case, you might build a cross compiler on a UNIX system which runs on a win32 machine, producing code for a third architecture, such as ARM. In this example, --target would be 'arm-unknown-linux-gnu', while --host would be 'win32'.

--build

  This is the system the build is running on.

The following example of configure builds for an ARM system on an x86 system. It was run after an ARM system was built in `/usr/arm` and other required libraries were cross compiled.

          ./configure -target=arm-unknown-linux-gnu --prefix=/usr/arm \
          --host=arm-unknown-linux-gnu --build=i686-pc-linux-gnu --disable-plugin