Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110801124650.GK29562@port70.net>
Date: Mon, 1 Aug 2011 14:46:50 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: making a musl wrapper for TCC

* Jens Staal <staal1978@...il.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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.