Using GCCSDK
From RISC OS
Using GCCSDK to cross-compile for RISC OS
This is a quick outline of how to use GCCSDK and its autobuilder. We hope to expand this section soon.
Cross-compiling for RISC OS is done by using GCCSDK on Unix-alike host system, such as GNU/Linux, FreeBSD, Solaris, MacOS X or even Windows (under Cygwin). To get started, ensure you have a Subversion client installed for your system, and fetch the GCCSDK source to the current directory (which needs about 280MB disc space):
mkdir gccsdk svn co svn://svn.riscos.info/gccsdk/branches/release_3_4_6/gcc gccsdk/gcc svn co svn://svn.riscos.info/gccsdk/trunk/autobuilder gccsdk/autobuilder
Detailed instructions are given in the file gccsdk/gcc/README (or the WebSVN copy), however they are essentially as follows. Refer to the README where assumptions are noted.
You'll need at least the following programs (or later versions) installed on your Unix-alike machine:
gcc version 3 recommended svn (subversion) bash for this example autoconf version 2.50 autoheader bison version 1.27 flex version 2.5.4 gperf version 2.7.2 sed version 2.05 GNU make version 3.80 makeinfo version 4.2 (see README for Debian notes)
We also need to be able to write to a directory named /home/riscos (this can be changed, see the README). First we set the GCCSDK_SRC variable so this tutorial can refer to the position of the sources.
bash export GCCSDK_SRC=$PWD/gccsdk
Then we build GCCSDK (this may take many minutes, depending on the speed of your computer):
cd gccsdk/gcc autoconf ; autoheader ./do-configure make setup make build-cross make porting-scripts
Now use the autobuilder to build a package:
mkdir ~/build cd ~/build $GCCSDK_HOME/autobuilder/build -v wget
This will attempt to build in the ~/build/wget directory (that is, in build/wget in your home directory). If the build is successful this will be deleted and the results placed in $GCCSDK_SRC/autobuilder/autobuilder_packages. If not successful the ~/build/wget directory will remain for you to inspect. The output from the build process is also saved in $GCCSDK_SRC/autobuilder/network/wget as either a file last-success or last-failure depending on what happened.
See autobuilder documentation gccsdk/autobuilder/AutoBuilder.html (or see HTML source from WebSVN) for more detailed instructions.