amigaos-cross-toolchain/README.md

129 lines
4.6 KiB
Markdown
Raw Permalink Normal View History

AmigaOS cross compiler for Linux / MacOSX / Windows
2013-05-21 16:32:00 +00:00
===
[![Build Status](https://circleci.com/gh/cahirwpz/amigaos-cross-toolchain.svg?&style=shield)](https://circleci.com/gh/cahirwpz/amigaos-cross-toolchain)
2016-10-04 19:32:16 +00:00
2013-05-21 16:32:00 +00:00
**Author:** [Krystian Bacławski](mailto:krystian.baclawski@gmail.com)
**This project is missing a maintainer!** Want to become one? Ask [adtools](https://github.com/orgs/adtools) developer team!
**Short description:** Cross toolchain build script for AmigaOS m68k and ppc targets. Supported host platforms are Linux, MacOSX and Windows (with [MSYS2](https://msys2.github.io/)).
2013-05-22 18:41:06 +00:00
### Overview
2013-05-21 16:32:00 +00:00
**amigaos-cross-toolchain** project provides an easy way to build AmigaOS 3.x (m68k) and ppc AmigaOS 4.x (ppc) target toolchain in a Unix-like environment.
Build process should produce following set of tools for **m68k-amigaos** target:
2013-05-21 16:32:00 +00:00
* gcc 2.95.3
* g++ 2.95.3
* libstdc++ 2.10
2017-08-18 12:18:32 +00:00
* binutils 2.14 (assembler, linker, etc.)
2015-08-29 10:33:13 +00:00
* libnix 2.2 (standard ANSI/C library replacement for AmigaOS)
2013-05-21 16:32:00 +00:00
* libm 5.4 (provides math library implementation for non-FPU Amigas)
* AmigaOS headers & libraries & autodocs (for AmigaOS 3.9)
2015-08-29 10:33:13 +00:00
* vbcc toolchain (most recent release) including vasm, vlink and C standard library
2016-10-02 19:16:01 +00:00
* IRA: portable M68000/010/020/030/040 reassembler for AmigaOS hunk-format
executables, libraries, devices and raw binary files
* vda68k: portable M68k disassembler for 68000-68060, 68851, 68881, 68882
* ~~[amitools](https://github.com/cnvogelg/amitools/blob/master/README.md#contents) with [vamos](https://github.com/cnvogelg/amitools/blob/master/doc/vamos.md) AmigaOS emulator which is proven to run SAS/C~~
2013-05-21 16:32:00 +00:00
... and following set of tools for **ppc-amigaos** target:
* gcc 4.2.4
* g++ 4.2.4
* binutils 2.18 (assembler, linker, etc.)
* newlib
* clib 2.2
* AmigaOS headers & libraries & autodocs (for AmigaOS 4.1)
2013-05-21 16:32:00 +00:00
**Note:** *Patches are welcome!*
2013-05-22 18:41:06 +00:00
### Downloads
2013-05-21 16:32:00 +00:00
There are no binary downloads provided for the time being. I do as much as possible to make the toolchain portable among Unix-like environments. Following platforms were tested and the toolchain is known to work for them:
2013-05-22 18:41:06 +00:00
* Windows 7 SP1 32-bit (MSYS2 2.6.0, gcc 5.3.0)
* Ubuntu 16.04 LTS 32-bit (gcc 5.4.0)
* Ubuntu 16.04 LTS 64-bit (gcc 5.4.0) *Requires gcc-multilib package, and i386 libraries!*
* MacOS X 10.9.5 (MacPorts - Apple's clang-600.0.57)
2013-05-22 18:41:06 +00:00
2013-05-23 19:00:54 +00:00
### Documentation
Documentation from Free Software Fundation:
2013-09-07 08:00:40 +00:00
2013-05-23 19:00:54 +00:00
* [gcc 2.95.3](http://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc.html)
* [binutils](http://sourceware.org/binutils/docs/)
Texinfo documents from GeekGadgets converted into HTML:
* [libnix - a static library for GCC on the amiga](http://cahirwpz.users.sourceforge.net/libnix/index.html)
* [AmigaOS-only features of GCC](http://cahirwpz.users.sourceforge.net/gcc-amigaos/index.html)
2013-05-22 18:41:06 +00:00
2013-06-09 16:55:12 +00:00
AmigaOS specific documents:
* [Amiga Developer Docs](http://amigadev.elowar.com)
2013-05-22 18:41:06 +00:00
### Compiling
2014-01-02 22:06:46 +00:00
*Firstly… you should have basic understanding of Unix console environment, really* ;-)
2013-05-22 18:41:06 +00:00
#### Prerequisites
You have to have following packages installed in your system:
2013-05-21 16:32:00 +00:00
* GNU gcc 5.x **32-bit version!** or Clang
* Python 2.7.x
* libncurses-dev
* python-dev 2.7
* GNU make 4.x
* perl 5.22
2015-08-29 10:33:13 +00:00
* git
* GNU patch
* GNU gperf
* GNU bison
2013-05-21 16:32:00 +00:00
2013-09-07 08:00:40 +00:00
*For MacOSX users*: you'll likely need to have [MacPorts](http://www.macports.org) or [Homebrew](http://brew.sh) installed in order to build the toolchain.
2013-05-22 18:41:06 +00:00
#### How to build?
2013-05-21 16:32:00 +00:00
2014-01-04 23:11:38 +00:00
**Warning:** *Building with `sudo` is not recommended. I'm not responsible for any damage to your system.*
2013-09-07 08:00:40 +00:00
2013-05-22 18:41:06 +00:00
Follow steps listed below:
2013-05-21 16:32:00 +00:00
1. Fetch *amigaos-cross-toolchain* project to your local drive:
2017-04-17 08:55:04 +00:00
```
# git clone git://github.com/cahirwpz/amigaos-cross-toolchain.git
# cd amigaos-cross-toolchain
2014-01-04 23:05:35 +00:00
```
2. Run `toolchain-m68k` or `toolchain-ppc` script (with `--prefix` option to specify where to install the toolchain). Note, that the destination directory must be writable by the user.
2017-04-17 08:55:04 +00:00
```
# ./toolchain-m68k --prefix=/opt/m68k-amigaos build
2014-01-04 23:05:35 +00:00
```
2015-08-29 10:33:13 +00:00
3. Wait for the result :-)
2013-05-21 16:32:00 +00:00
2015-08-29 10:33:13 +00:00
4. *(optional)* Install additional SDKs (e.g. AHI, CyberGraphX, Magic User Interface, etc.):
2017-04-17 08:55:04 +00:00
```
# ./toolchain-m68k --prefix=/opt/m68k-amigaos install-sdk ahi cgx mui
2014-01-04 23:05:35 +00:00
```
#### What if something goes wrong?
2013-05-21 16:32:00 +00:00
If the build process fails, please write me an e-mail. I'll try to help out. Don't forget to put into e-mail as much data about your environment as possible!
It's **vitally important** to send me a full log from build process. You can capture it by redirecting output to a file with following command:
```
2017-04-17 08:55:04 +00:00
# ./toolchain-m68k build 2>&1 | tee build.log
```
... but remember to cleanup your build environment beforehand with:
```
2017-04-17 08:55:04 +00:00
# rm -rf .build-m68k
```