musl-tcc/README

40 lines
1.5 KiB
Plaintext
Raw 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-03-24 00:52:27 +00:00
- math library is removed momently.
Because some missing floating-point features of TinyCC.I am working
on completing.
- @PLT dynamic linking function calls are removed.
TinyCC does not have the feature.Dynamic linking library(.so)
is expected not to work.
2022-04-06 00:36:42 +00:00
Some features had been removed momently but now they are usable,including:
- fenv library(maybe applying a patch to TinyCC is needed)
2022-03-20 08:48:53 +00:00
2022-03-21 08:49:51 +00:00
To compile,simply run
export CC=tcc # Set the compiler
2022-03-24 00:52:27 +00:00
export RANLIB='tcc -r' # Using tcc builtin librarian
export AR='tcc -ar' # See above
2022-03-21 08:49:51 +00:00
./configure --target=x86_64 # The script cannot detect the
2022-03-24 00:52:27 +00:00
# platform with tcc because of
# missing option "-dumpmachine"
2022-04-03 02:27:48 +00:00
make # I finish my compiling in 10s with
two threads on i7-720QM @ 1.60GHz
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
version from yours,so if you fail to compile,try to apply the patches
listed in /tcc-patch/,including:
- empty_archive.patch
Enables TinyCC to generate empty ar archive
2022-04-06 00:36:42 +00:00
- mxcsr.patch
Adds the support of ldmxcsr and stmxcsr