musl-tcc/README

47 lines
1.9 KiB
Plaintext
Raw Permalink Normal View History

2022-03-21 08:49:51 +00:00
This is a modified version of musl libc 1.12 which is able to be
compiled with TinyCC on x86_64 machines.
2022-03-20 08:48:53 +00:00
2022-03-21 08:49:51 +00:00
Although TinyCC is quite complete as a tiny C compiler,some features are
still missing,including:
- _Complex types
All related to _Complex are removed.
- Full GNU-style inline assembly support.
The original versions of __syscall4(),__syscall5() and __syscall6()
don't work.They are replaced by assembly implemention in
2022-04-03 02:27:48 +00:00
/src/internal/x86_64/syscall.S
2022-04-15 06:41:11 +00:00
- math library has been use the pure C implementation
Because some missing floating-point features of TinyCC.
2022-04-06 00:36:42 +00:00
Some features had been removed momently but now they are usable,including:
2022-07-09 13:22:43 +00:00
- fenv library
2022-04-15 06:41:11 +00:00
- math library(using C implementation now)
2022-07-09 13:22:43 +00:00
- dynamic link support (NOT well tested)
2022-03-20 08:48:53 +00:00
2022-03-21 08:49:51 +00:00
To compile,simply run
2022-04-14 02:32:47 +00:00
./configure --target=x86_64 CC='tcc' AR='tcc -ar' RANLIB='echo' \
LIBCC='/usr/local/lib/tcc/libtcc1.a'
2022-04-03 02:27:48 +00:00
make # I finish my compiling in 10s with
two threads on i7-720QM @ 1.60GHz
2022-04-14 02:32:47 +00:00
TinyCC's runtime environment library libtcc1.a needs specifying manually
now.The path of argument LIBCC may need adjusting for your machine.
2022-03-20 08:48:53 +00:00
2022-03-21 08:49:51 +00:00
All modified and addtional files are under MIT License as well.
2022-04-03 02:27:48 +00:00
Some changes are made to my TinyCC (This means I may have a different
2022-07-09 13:22:43 +00:00
version from yours,so if you fail to compile,try to get the lastest
version from TinyCC's Git Repository.The building process is OK on
commit 2d210fe.The later version should also work
$ tcc -v tcc # on my machine
version 0.9.27 mob:2d210fe (x86_64 Linux)
Some helper scripts are in /tests/Compile.sh (for static link) and
/tests/Compile_Dynamic.sh (for dynamic link).As is mentioned,modifying the
path to libtcc1.a may be needed.
A simple single-filed editor pico is included (/tests/pico.c),its LICENSE is
DIFFERENT from original musl and musl-tcc.So be careful when you use it.
This generates its exectuable file:
$ ./Compile.sh pico.c pico
or
$ ./Compile_Dynamic.sh pico.c pico
Please run these commands in /tests/