anyone interested in helping fixing the 'tcc' compiler ?

Luigi Rizzo rizzo at iet.unipi.it
Mon Nov 23 12:57:50 UTC 2009


On Mon, Nov 23, 2009 at 01:26:53PM +0100, Dag-Erling Sm??rgrav wrote:
> Luigi Rizzo <rizzo at 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 at 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...



More information about the freebsd-arch mailing list