Using GCCSDK 3.4.6

From RISC OS

(Difference between revisions)
Jump to: navigation, search
(New page to move older instructions to)
(Move old section to here.)
Line 2: Line 2:
These are maintained for historical reference, and many not work exactly due to the focus being on GCC 4.1
These are maintained for historical reference, and many not work exactly due to the focus being on GCC 4.1
 +
 +
== Using the cross-compiler on its own ==
 +
 +
The cross-compiler gets installed in the 'prefix' bin sub-directory given as parameter to the 'configure' script (see 'do-configure' file).  You can find the following binaries : ar, c++, cc, cmunge, decaof, drlink, g++, g77, gcc, gcov, libfile, nm, ranlib, resgen, strip and zip, which you can on your Unix-alike host to build RISC OS programs.
 +
 +
Since [[GCCSDK_Releases#GCCSDK_GCC_3.4.6_Release_3|GCCSDK GCC 3.4.6 Release 3]] and with the aid of [[syslogd|syslogd module]] you have RISC OS throwback support in the cross-compiler allowing to have warning and error feedback on RISC OS of compilations done on a remote host.
 +
 +
An example of a more advance use of the cross-compiler is to build GCC for RISC OS (the first 4 steps are not necessary when you already have the GCC cross-compiler built):
 +
 +
  cd $GCCSDK_SRC/gcc
 +
  autoconf ; autoheader
 +
  ./do-configure
 +
  make setup
 +
  make
 +
== Using the cross-compiler and porting-scripts ==
== Using the cross-compiler and porting-scripts ==

Revision as of 15:19, 2 February 2008

Contents

Instructions for use of GCCSDK 3.4.6 with Autobuilder

These are maintained for historical reference, and many not work exactly due to the focus being on GCC 4.1

Using the cross-compiler on its own

The cross-compiler gets installed in the 'prefix' bin sub-directory given as parameter to the 'configure' script (see 'do-configure' file). You can find the following binaries : ar, c++, cc, cmunge, decaof, drlink, g++, g77, gcc, gcov, libfile, nm, ranlib, resgen, strip and zip, which you can on your Unix-alike host to build RISC OS programs.

Since GCCSDK GCC 3.4.6 Release 3 and with the aid of syslogd module you have RISC OS throwback support in the cross-compiler allowing to have warning and error feedback on RISC OS of compilations done on a remote host.

An example of a more advance use of the cross-compiler is to build GCC for RISC OS (the first 4 steps are not necessary when you already have the GCC cross-compiler built):

 cd $GCCSDK_SRC/gcc
 autoconf ; autoheader
 ./do-configure
 make setup
 make


Using the cross-compiler and porting-scripts

The porting-scripts are installed in the 'with-riscos-env' directory given as parameter to the 'configure' script (see 'do-configure' file - by default it's /home/riscos/env). The "ro-" prefixed scripts are wrappers around the similar named and well-known build tools to ensure that the cross-compiler is used instead of the native compiler on your Unix-alike host.

So you use '/home/riscos/env/ro-make' instead of 'make' and your project will be built using the cross-compiler instead of the native compiler. You use '/home/riscos/env/ro-config' instead of './configure' and your project will be 'configured' using the cross-compiler settings. And so on.

Using the cross-compiler with Autobuilder

The Autobuilder infrastructure is meant to be able to cross-compile a broad set of open-source programs with a minimal of manual work (ideally none) allowing to have constant access to recent versions of those programs under RISC OS. It consists of a couple of scripts in the Autobuiler directory gccsdk/autobuilder which fetches the to-be-built programs as source from internet and cross-compiles it using the GCCSDK cross-compiler and its porting-scripts.

The recipe to build these open-source programs is stored in a per program unique subdirectory of the 'autobuilder' directory and is holding one or more files specifying where the source can be found, the patches needing to be applied (if any) and how it needs to be built using the cross-compiler and porting-scripts. And finally how it should be packaged and published (either locally in a directory, either uploaded to a website such as Unix Porting Project download pages.

Personal tools