* making a musl wrapper for TCC
@ 2011-08-01 11:41 Jens Staal
2011-08-01 12:46 ` Szabolcs Nagy
0 siblings, 1 reply; 2+ messages in thread
From: Jens Staal @ 2011-08-01 11:41 UTC (permalink / raw)
To: musl
Hi all
I have been trying to package a statically compiled TCC compiled with
musl libc [1]. I would also like this package to become self-hosting
and I have been trying to look at the musl-gcc wrapper but I have not
really figured it out. If anyone knows how to make a similar one for
TCC, that would be great :)
[1] https://aur.archlinux.org/packages.php?ID=50286
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: making a musl wrapper for TCC
2011-08-01 11:41 making a musl wrapper for TCC Jens Staal
@ 2011-08-01 12:46 ` Szabolcs Nagy
0 siblings, 0 replies; 2+ messages in thread
From: Szabolcs Nagy @ 2011-08-01 12:46 UTC (permalink / raw)
To: musl
* Jens Staal <staal1978@gmail.com> [2011-08-01 13:41:31 +0200]:
> I have been trying to package a statically compiled TCC compiled with
> musl libc [1]. I would also like this package to become self-hosting
> and I have been trying to look at the musl-gcc wrapper but I have not
> really figured it out. If anyone knows how to make a similar one for
> TCC, that would be great :)
>
> [1] https://aur.archlinux.org/packages.php?ID=50286
you can compile foo.c with musl+tcc using
MUSL=/path/to/musl
TCC=/usr/lib/tcc
tcc -I$MUSL/include -c foo.c
ld -o foo foo.o $MUSL/lib/crti.o $MUSL/lib/crt1.o $MUSL/lib/crtn.o -L$MUSL/lib -lc -L$TCC -ltcc1 -nostdlib
you may also want to specify the '-X -d -e _start -Bstatic' ldflags
for dynamic linking you can use '-dynamic-linker $MUSL/libc/libc.so'
instead of -Bstatic
if you want musl-gcc like wrapper then i think you will
have to do argument parsing yourself as many projects
use gcc specific flags which are not supported by tcc
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-01 12:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-01 11:41 making a musl wrapper for TCC Jens Staal
2011-08-01 12:46 ` Szabolcs Nagy
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).