[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Add support of musl-libc to tinycc

From: Larry Doolittle
Subject: Re: [Tinycc-devel] Add support of musl-libc to tinycc
Date: Sat, 6 May 2017 20:54:45 -0700
User-agent: Mutt/1.5.21 (2010-09-15)

Micheal, Marc, and tinycc lurkers -

On Sun, May 07, 2017 at 04:54:38AM +0200, Michael Matz wrote:
> On Thu, 20 Apr 2017, Marc Vertes wrote:
> >I just committed the patch to support musl-libc in the tcc
> >compiler development branch: http://repo.or.cz/w/tinycc.git
> > [...]
> >Dear tinycc developers, let me know if this feature can be added
> >to the upcoming 0.9.27 version, and also how to fix the DLL
> >bootstrap problem.
> Fixed in mob.  The problem is the stricter dynamic loader of musl,
> which ignores all STB_LOCAL symbols for symbol resolution [...]
> With that the tests also run on musl.  [...]

On Debian Jessie amd64 with musl-dev installed, tinycc (commit 5732a188)
detects that musl exists (CONFIG_musl=yes in config.mak), builds OK, but 
fails on make test at dlltest:

./tcc2 -B.. -I/home/larry/git/tinycc/include -I/home/larry/git/tinycc -I.. 
-DCONFIG_TRIPLET="\"x86_64-linux-gnu\"" -DTCC_TARGET_X86_64 -DTCC_MUSL 
-DONE_SOURCE -run /home/larry/git/tinycc/tcc.c -B.. 
-I/home/larry/git/tinycc/include -I/home/larry/git/tinycc -I.. -run 
/usr/lib/x86_64-linux-gnu/libc.so:2: error: unrecognized file type
tcc: error: Unknown relocation type: 23


$ cat /usr/lib/x86_64-linux-gnu/libc.so
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
GROUP ( /lib/x86_64-linux-gnu/libc.so.6 
/usr/lib/x86_64-linux-gnu/libc_nonshared.a  AS_NEEDED ( 
/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 ) )

My personal recommendation is to disable musl detection in an 0.9.27 release,
if that happens anytime soon.  Other than the teething problems with musl
support, the rest of tinycc works like a champ for me.

The contrast between tinycc and gcc is astounding.  I can build a tcc binary
faster than I can unpack gcc-4.7.4 sources.  I have long-term interest in
tcc for use in diverse-double-compiling.

I just made a quick attempt to build gcc-4.7.4 with current git tcc.
It made it through about 337 compiles before failing on
../.././gcc/c-family/c-opts.c:141: error: ';' expected (got "=")

  - Larry

reply via email to

[Prev in Thread] Current Thread [Next in Thread]