Libronin: Difference between revisions

From dreamcast.wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 16: Line 16:
* Libronin 0.5 (2008-01-01)
* Libronin 0.5 (2008-01-01)
* Libronin 0.6 (2016-09-26)
* Libronin 0.6 (2016-09-26)
==Building a toolchain for libronin==
The standard [[KallistiOS]] sh-elf toolchain contains patches that prevent it from working with libronin; however, KallistiOS's <code>dc-chain</code> script can be used to easily build a libronin-compatible raw toolchain. You can build this toolchain to a separate directory than an existing KallistiOS toolchain.
Clone the KallistiOS repo somewhere convenient:
git clone https://github.com/KallistiOS/KallistiOS.git kos
Enter the toolchain directory:
cd kos/util/dc-chain
Copy over one of the default configuration files:
cp config.mk.sample.testing config.mk
Open <code>config.mk</code> in a text editor and edit the following lines.
toolchains_base=/opt/toolchains/dc/roninchain # Where you want to install the toolchain
pass2_languages=c,c++,objc,obj-c++            # Which languages you want to build support for
thread_model=posix                            # single threading or posix threads. posix threads might not successfully build for some languages
auto_fixup_sh4_newlib=0                      # Set this 0 to ensure raw toolchain with no patches
Download the packages:
./download.sh
Unpack the files:
./unpack.sh
And finally, build the toolchain. '''Do not''' use <code>make</code> alone or the build script will patch the toolchain with KOS patches, which is not what we want here!
make build
You can now use the compilers stored at <code>/opt/toolchains/dc/roninchain/sh-elf/bin</code> and <code>/opt/toolchains/dc/roninchain/arm-eabi/bin</code> to compile libronin. You may need to modify <code>Makefile</code> included with libronin to include the path to the compilers.
You may delete the <code>kos</code> folder that you cloned using git earlier once your toolchain is successfully installed.


==Source==
==Source==

Revision as of 20:42, 8 January 2023

libronin is a software development library similar to KallistiOS. It was developed by Marcus Comstedt, Peter Bortas and Per Hedbor. It is used in DreamSNES, ScummVM, and Cave Story. It is primarily known for its use in projects by Marcus Comstedt and histat.

Projects using libronin

Release history

libronin's latest release was in 2016.[1]

  • Libronin 0.1 (2002-02-03)
  • Libronin 0.2 (2002-02-27)
  • Libronin 0.3 (2002-04-21)
  • Libronin 0.4 (2003-05-04)
  • Libronin 0.5 (2008-01-01)
  • Libronin 0.6 (2016-09-26)

Building a toolchain for libronin

The standard KallistiOS sh-elf toolchain contains patches that prevent it from working with libronin; however, KallistiOS's dc-chain script can be used to easily build a libronin-compatible raw toolchain. You can build this toolchain to a separate directory than an existing KallistiOS toolchain.

Clone the KallistiOS repo somewhere convenient:

git clone https://github.com/KallistiOS/KallistiOS.git kos

Enter the toolchain directory:

cd kos/util/dc-chain

Copy over one of the default configuration files:

cp config.mk.sample.testing config.mk

Open config.mk in a text editor and edit the following lines.

toolchains_base=/opt/toolchains/dc/roninchain # Where you want to install the toolchain
pass2_languages=c,c++,objc,obj-c++            # Which languages you want to build support for
thread_model=posix                            # single threading or posix threads. posix threads might not successfully build for some languages
auto_fixup_sh4_newlib=0                       # Set this 0 to ensure raw toolchain with no patches

Download the packages:

./download.sh

Unpack the files:

./unpack.sh

And finally, build the toolchain. Do not use make alone or the build script will patch the toolchain with KOS patches, which is not what we want here!

make build

You can now use the compilers stored at /opt/toolchains/dc/roninchain/sh-elf/bin and /opt/toolchains/dc/roninchain/arm-eabi/bin to compile libronin. You may need to modify Makefile included with libronin to include the path to the compilers.

You may delete the kos folder that you cloned using git earlier once your toolchain is successfully installed.

Source

References

  1. [1], Libronin | DC Evolution - The Dreamcast Resource