nolibc.h looks nice and we should support it.


What is nolibc.h?

a header to replace libc on linux with syscalls.
created by Willy Tarreau (linux kernel 2.4 maintainer).

Where?
a single file version (changed 21.1.2021) is on his homepage
http://git.1wt.eu/git/nolibc.git (License: MIT)


The included test 'hello.c' works with gcc, but fails with tcc:
x86_64:
nolibc.h:1479: error: asm constraint 7 ('r') could not be satisfied

i386-tcc:
compiles, but the created program produces no output

Other arch fail at the last line of the startup-code
(empty asm string)
arm64-tcc (at line 996), arm-tcc (at 799) and riscv64-tcc (at 1399)
Interesting:
x86_64 (line 434) and I386 (line 614) have the same
empty asm string at the end of the startup-code,
but do not complain.


nolibc.h is also in the linux kernel source
( tools/include/nolibc/nolibc.h ) (License: LGPL-2.1 OR MIT)




(looking forward to be able to build a x86_64-linux-nolibc-tcc)


--
Regards...

Detlef
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to