From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: making a musl wrapper for TCC
Date: Mon, 1 Aug 2011 14:46:50 +0200 [thread overview]
Message-ID: <20110801124650.GK29562@port70.net> (raw)
In-Reply-To: <CAK8RtFr=RFT9uwK2XoA1DsK=EKxNo46km6e=meL-B1iVLw9r5w@mail.gmail.com>
* 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
prev parent reply other threads:[~2011-08-01 12:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-01 11:41 Jens Staal
2011-08-01 12:46 ` Szabolcs Nagy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110801124650.GK29562@port70.net \
--to=nsz@port70.net \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).