From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/218 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: making a musl wrapper for TCC Date: Mon, 1 Aug 2011 14:46:50 +0200 Message-ID: <20110801124650.GK29562@port70.net> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1312202829 32011 80.91.229.12 (1 Aug 2011 12:47:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 1 Aug 2011 12:47:09 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-302-gllmg-musl=m.gmane.org@lists.openwall.com Mon Aug 01 14:47:05 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Qnrtg-0003WG-Si for gllmg-musl@lo.gmane.org; Mon, 01 Aug 2011 14:47:05 +0200 Original-Received: (qmail 11423 invoked by uid 550); 1 Aug 2011 12:47:03 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 11415 invoked from network); 1 Aug 2011 12:47:02 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Xref: news.gmane.org gmane.linux.lib.musl.general:218 Archived-At: * Jens Staal [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