GCCSDK: Difference between revisions
(Added CryptRandom; Reworked structure a bit; Talk about RMEnsure of the support modules.) |
|||
(43 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
= Introduction = |
|||
The GCCSDK riscos.info project is really two closely related sub-projects : [[#GCC_for_RISC OS|GCC for RISC OS]], the RISC OS port of GCC, and [[#GCC_Software_Development Kit|GCC Software Development Kit]], the environment for porting and developing GCC for RISC OS and also for porting any other programs to RISC OS. The latter is actually used to create the former. The documentation is split accordingly. |
|||
⚫ | |||
⚫ | |||
[http://gcc.gnu.org/ GNU Compiler Collection] (GCC) is a free collection of compilers that provide the user with a powerful tool for translating C, C++ and Fortran source into fast ARM code that is suitable for execution on RISC OS as application or module. GCC is the common shorthand term for the GNU Compiler Collection. This is both the most general name for the compiler and the name used when the emphasis is on compiling C programs. |
|||
[[GCC for RISC OS]] is a complete, free and fully-featured compiler solution for RISC OS based on the [http://gcc.gnu.org/ GNU Compiler Collection]. It can compile C and C++ using modern standards and assemble ARM code. It also includes support for RISC OS modules, and usage of the native RISC OS Shared C Library, or the bundled Unix-compatibility library [[UnixLib]] as runtime library. It aims to be feature complete above and beyond the commercial [[RISC OS Open Ltd]]'s C/C++ compiler suite. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
The current version of GCC for RISC OS is 4.7.4 release 5 which is based on [http://en.wikipedia.org/wiki/Executable_and_Linkable_Format ELF Object format] and binutils. Previous releases were based on GCC 3.4 and targets the traditional RISC OS AOF and AIF targets. |
|||
⚫ | |||
* [[GCC for RISC OS]] |
|||
⚫ | |||
== GCC Software Development Kit == |
|||
⚫ | |||
⚫ | |||
Using the GCCSDK build environment the Autobuiler is a set of wrapper scripts allowing you to easily cross-compile programs and libraries. Autobuilder scripts were developed as part of the [http://www.riscos.info/unix/ Unix Porting Project] and are now part of, and further developed in, the GCCSDK project. |
|||
⚫ | |||
=== Setup === |
|||
GCC is very easy to setup on RISC OS. The following is what you need to get started with a fully working C compiler. |
|||
* Download [http://www.riscos.info/downloads/gccsdk/latest/gcc.zip GCC base], [http://www.riscos.info/downloads/gccsdk/latest/cc1.zip C Compiler] and [http://www.riscos.info/downloads/gccsdk/latest/gccdoc.zip GCC documentation]. |
|||
* Unpack these 3 archives to the same place, to a !gcc application. |
|||
* Download the support modules needed by UnixLib [http://www.riscos.info/downloads/gccsdk/sharedunixlib/system.zip SharedUnixLibrary and Digital Renderer] and [http://netsurf.sourceforge.net/iconv/iconv_latest.zip Iconv] (Iconv [http://netsurf.sourceforge.net/iconv/iconv/iconv007g.zip A9home version]). You can drop this over your existing !System, but we strongly recommend using a system merge utility. |
|||
* Double-click on !gcc - if nothing untoward happens, you're ready to go. |
|||
=== Additional languages and tools === |
|||
You may also wish to install one or more of the following components as well : |
|||
* [http://www.riscos.info/downloads/gccsdk/latest/cc1plus.zip C++ compiler] |
|||
* [http://www.riscos.info/downloads/gccsdk/latest/g77.zip Fortran compiler] |
|||
* [http://www.riscos.info/downloads/gccsdk/latest/utils.zip various utils] (bison, make, zip, gzip, flex, diff, ...) |
|||
* [http://www.riscos.info/downloads/gccsdk/latest/cmunge.zip CMunge], a module header creation tool (CMHG clone). |
|||
=== Tutorial === |
|||
Now you can try the [[GCC tutorial]] or read the accompanying documentation inside the !gcc application, which shows you some simple examples of creating RISC OS applications and RISC OS modules. |
|||
=== Useful programs === |
|||
The following list contains useful programs helping you to develop with GCC on RISC OS : |
|||
* [http://www.reallysmall.co.uk/Pages/normal/software/development/sourcery/sourcery.html Sourcery] : Sourcery will manage the source code that makes up a project but it will also manage the various resources files that are required to produce a RISC OS application. These include Sprite, Message and Template files. |
|||
== Distributing GCC compiled programs == |
|||
When you distribute a GCC compiled program and are using the SharedCLibrary as runtime library (i.e. using option <tt>-mlibscl</tt>), then no additional support files need to be made available with your program. |
|||
⚫ | GCC Software Development Kit (GCCSDK) is a portable build environment for creating RISC OS executables to be run natively on RISC OS. The build environment is designed to be hosted on a Unix-like system, such as GNU/Linux, FreeBSD, Solaris, MacOS X or even Windows (under Cygwin). GCCSDK releases are tied-in with the corresponding GCC releases. |
||
On the other hand when you are using UnixLib as runtime library (and that's the default runtime library), then an up-to-date version of some UnixLib support modules need to be used together with your program. The following is an overview of these support modules : |
|||
⚫ | GCCSDK can be used to compile and develop GCC and UnixLib itself, or as the basis for a cross-compiling system. It includes a number of "porting scripts" which automate the process of building and configuring new ports, which would otherwise be difficult and error prone, and not possible when done natively under RISC OS. |
||
* SharedUnixLibrary module (mandatory) : http://www.riscos.info/downloads/gccsdk/sharedunixlib/system.zip |
|||
* Digital Renderer module (only needed when your code is using the OSS sound interface via the /dev/dsp device) : http://www.riscos.info/downloads/gccsdk/sharedunixlib/system.zip |
|||
* Iconv module (only needed when your code is using iconv routines) : http://netsurf.sourceforge.net/iconv/iconv_latest.zip |
|||
* Iconv module - A9home version (temporary A9 home version) : http://netsurf.sourceforge.net/iconv/iconv/iconv007g.zip |
|||
* CryptRandom module (only needed when random data is read via /dev/(u)random device) : http://www.markettos.org.uk/ |
|||
* !UnixHome application (typically required by some ported Unix programs wishing to store configuration files and settings in the Unix user's home directory) : [http://www.riscos.info/unix/downloads/support/UnixHome-1.03.zip !UnixHome]. The !UnixHome application should be 'seen' by the RISC OS Filer before they can make use of it. |
|||
* [[Using GCCSDK]] |
|||
The modules SharedUnixLibrary, Digital Renderer, Iconv and CryptRandom will be RMEnsure'd with their minimal needed version number by the UnixLib code at the moment their functionality is needed. Appropriate error message will be returned when these modules are not available or when they do not have a sufficent high enough version number. |
|||
⚫ | |||
⚫ | |||
When you distribute a copy of these UnixLib support modules with your program, please also mention the URLs in documentation and/or installation notes or program where up-to-date versions can be found. |
|||
The autobuilder is a powerful system for automatically fetching, configuring and building of sources and dependencies for programs, making use of the porting scripts. Done manually, such a process would be tedious, time-consuming and error prone. Once a program is added to the autobuilder, other developers can easily reproduce the work, and concentrate on the important details. |
|||
⚫ | |||
The autobuilder presently includes instructions for building around 300 libraries and programs for RISC OS. |
|||
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). You [[#GCCSDK Source Repository|check-out the GCCSDK project]] and follow the instructions for cross-compilation in the <tt>gcc/README</tt> file. |
|||
* [[Using GCCSDK]] |
|||
* [[Autobuilder development|Putting a new program in the autobuilder]] |
|||
⚫ | |||
⚫ | |||
The status of the current GCCSDK development can be found at [[GCCSDK Development]]. |
|||
⚫ | |||
= GCCSDK GCC Releases = |
|||
A mailing list exists for GCCSDK discussions. To join it, send mail to <tt>majordomo@gccsdk.riscos.info</tt> with the following content in the <b>message body</b>: |
|||
⚫ | |||
<tt>subscribe gcc</tt> |
|||
⚫ | |||
A complete archive of the list can be found [http://gccsdk.riscos.info/mail-archive/gcc here]. |
|||
A mailing list exists for [http://www.riscos.info/cgi-bin/mailman/listinfo/gcc GCCSDK discussions]. |
|||
⚫ | |||
⚫ | |||
To keep track of bugs in GCCSDK we are using a [http://gccsdk.riscos.info/bugs/ bug-tracking system]. It is preferable to use this rather than e-mailing in order to avoid mails getting lost in our rather large inboxes and also in order to have an overview of any outstanding issues. |
|||
See [[Bug Reporting]] on how to submit bug reports against GCCSDK. |
|||
== GCCSDK Source Repository == |
|||
{{GCC and GCCSDK pages}} |
|||
Until beginning of March 2006 all our GCCSDK source code was managed using [http://cvshome.org/ CVS]. At that point we converted our CVS repository into a [http://subversion.tigris.org Subversion] repository and are no longer using CVS. Details how to access GCCSDK source repository can be found at our [[source repositories overview]]. |
Latest revision as of 14:01, 8 November 2021
Introduction
The GCCSDK riscos.info project is really two closely related sub-projects : GCC for RISC OS, the RISC OS port of GCC, and GCC Software Development Kit, the environment for porting and developing GCC for RISC OS and also for porting any other programs to RISC OS. The latter is actually used to create the former. The documentation is split accordingly.
GCC for RISC OS
GCC for RISC OS is a complete, free and fully-featured compiler solution for RISC OS based on the GNU Compiler Collection. It can compile C and C++ using modern standards and assemble ARM code. It also includes support for RISC OS modules, and usage of the native RISC OS Shared C Library, or the bundled Unix-compatibility library UnixLib as runtime library. It aims to be feature complete above and beyond the commercial RISC OS Open Ltd's C/C++ compiler suite.
There also exist front ends for other languages, such as Fortran, Objective C, Ada 9X, Modula-3, Pascal, Cobol and Java, however these have not been ported to run on RISC OS at this time. Some of these are present, but unsupported, in older versions of RISC OS GCC.
The current version of GCC for RISC OS is 4.7.4 release 5 which is based on ELF Object format and binutils. Previous releases were based on GCC 3.4 and targets the traditional RISC OS AOF and AIF targets.
GCC Software Development Kit
GCCSDK
GCC Software Development Kit (GCCSDK) is a portable build environment for creating RISC OS executables to be run natively on RISC OS. The build environment is designed to be hosted on a Unix-like system, such as GNU/Linux, FreeBSD, Solaris, MacOS X or even Windows (under Cygwin). GCCSDK releases are tied-in with the corresponding GCC releases.
GCCSDK can be used to compile and develop GCC and UnixLib itself, or as the basis for a cross-compiling system. It includes a number of "porting scripts" which automate the process of building and configuring new ports, which would otherwise be difficult and error prone, and not possible when done natively under RISC OS.
GCCSDK Autobuilder
The autobuilder is a powerful system for automatically fetching, configuring and building of sources and dependencies for programs, making use of the porting scripts. Done manually, such a process would be tedious, time-consuming and error prone. Once a program is added to the autobuilder, other developers can easily reproduce the work, and concentrate on the important details.
The autobuilder presently includes instructions for building around 300 libraries and programs for RISC OS.
Development
The status of the current GCCSDK development can be found at GCCSDK Development.
GCCSDK GCC Releases
All GCCSDK GCC Releases can be found on the downloads page. Details on what is changed in each release can be found at GCCSDK Releases.
Mailing list
A mailing list exists for GCCSDK discussions.
Bug reporting
See Bug Reporting on how to submit bug reports against GCCSDK.
GCC and GCCSDK pages |
GCC under RISC OS GCC for RISC OS, GCC tutorial, GCC common switches, GCC for beginners, UnixLib, ELFLoader |