Tiny C compiler for OR1K
Here is my port of Tiny C Compiler (tcc) for OpenRISC.
Why tcc?
- it's extremely fast comparing to gcc - 10x faster;
- it does not require a lot of memory to run - 32MB of RAM is more than enough for compiling fairly big projects.
This version of tcc can be used for cross-compilation or for running natively on OpenRISC system.
It requires libgcc and was tested with musl libc library.
You can get or1k-musl with libgcc and musl libc compiled for or1k from github/openrisc repo.
Instructions
build cross with gcc
./configure --config-musl --with-libgcc --tccdir=`pwd`/lib/tcc-or1k --sysroot=/opt/or1k-linux-musl/or1k-linux-musl
build target with gcc in cross compilation mode
./configure --config-musl --with-libgcc --tccdir=/usr/lib/tcc --cross-prefix=or1k-linux-musl- --config-predefs=no
build target with cross tcc
./configure --config-musl --with-libgcc --tccdir=/usr/lib/tcc --cc=/opt/openrisc/tcc/or1k-tcc --config-predefs=no
make or1k-tcc
Download
25.06.2018 tinycc-or1k-1.0.tar.bz2
22.01.2019 tinycc-or1k-1.1.tar.bz2
22.08.2019 tinycc-or1k-1.2.tar.bz2
10.04.2021 tinycc-or1k-1.3.tar.bz2
11.06.2022 tinycc-or1k-1.4.tar.bz2
25.06.2022 tinycc-or1k-1.5.tar.bz2
16.02.2023 tinycc-or1k-1.6.tar.bz2
06.11.2024 tinycc-or1k-1.7.tar.bz2
Changes in 1.1:
- sync with HEAD revision of original TinyCC;
- fixes for long long func parameters passing;
- static linking fixes.
Changes in 1.2:
- sync with HEAD revision of original TinyCC;
Changes in 1.3:
- sync with HEAD revision of original TinyCC;
- more linking fixes.
Changes in 1.4:
- sync with HEAD revision of original TinyCC;
- improved handling of type-casting corner cases;
- -run mode improvements;
- implemented computed goto's, label references extension.
Changes in 1.5:
- fixed bitfields, added variable-length arrays (vla) support.
Changes in 1.6:
- minor fix for compiling without libtcc (but with libgcc).
Changes in 1.7:
- sync with HEAD revision of original TinyCC;
- fix bitfield static initialization.
What is missing:
- or1k inline asm is not implemented;
- c11 atomic functions
- optional tcc features: bcheck (run-time arrays boundaries checking), backtrace;
- some fixes to debug info gen maybe needed;
This page was last modified on 6 Nov 2024