Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Nov 2009 14:05:46 +0100
From:      Luigi Rizzo <rizzo@iet.unipi.it>
To:        Dag-Erling Sm??rgrav <des@des.no>
Cc:        arch@freebsd.org
Subject:   Re: anyone interested in helping fixing the 'tcc' compiler ?
Message-ID:  <20091123130546.GA69098@onelab2.iet.unipi.it>
In-Reply-To: <86d439who2.fsf@ds4.des.no>
References:  <20091122111732.GA45909@onelab2.iet.unipi.it> <86d439who2.fsf@ds4.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 23, 2009 at 01:26:53PM +0100, Dag-Erling Sm??rgrav wrote:
> Luigi Rizzo <rizzo@iet.unipi.it> writes:
> > I have recently started playing with the Tiny C Compuler (lang/tcc)
> > which is amazingly useful for prototyping,
> 
> Looks pretty useless to me:
> 
> des@ds4 /usr/ports/lang/tcc% sudo make install clean
> Password:
> ===>  tcc-0.9.25 is only for i386, while you are running amd64.
> *** Error code 1

the message is actually misleading. The code seems to be able to
generate code for 64bit and arm. It's just the port that
is not enabling the feature.
It is also true that the upstream distribution is not very actively
maintained so some things may be flakey.

> > However, from the description it does not seem a horribly
> > hard problem. Perhaps someone with a bit of knowledge on
> > how our ld-elf.so works should not have a hard time pinpointing
> > the problem so that other people can fix it ?
> 
> Actually, ld-elf.so is not that scary.  Take a look at rtld(1) and start
> setting debugging envars.  Set up a jail so you can mess around with the
> jail's ld-elf.so without bricking your system.

yeah, i have started doing some things there.
First i found that tcc is not generating the PHDR Program Header that
freebsd mostly requires. Next, there seems to be some
discrepancy on how entries are tagged in the dynamic segment:
what on linux is REL i think should become JMPREL or PLTGOT on
FreeBSD. Anyways, i am working on it...




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091123130546.GA69098>