From owner-freebsd-arch@FreeBSD.ORG Mon Nov 23 12:57:50 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8839D106568D for ; Mon, 23 Nov 2009 12:57:50 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 4AC188FC12 for ; Mon, 23 Nov 2009 12:57:50 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id C1596730DA; Mon, 23 Nov 2009 14:05:46 +0100 (CET) Date: Mon, 23 Nov 2009 14:05:46 +0100 From: Luigi Rizzo To: Dag-Erling Sm??rgrav Message-ID: <20091123130546.GA69098@onelab2.iet.unipi.it> References: <20091122111732.GA45909@onelab2.iet.unipi.it> <86d439who2.fsf@ds4.des.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86d439who2.fsf@ds4.des.no> User-Agent: Mutt/1.4.2.3i Cc: arch@freebsd.org Subject: Re: anyone interested in helping fixing the 'tcc' compiler ? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2009 12:57:50 -0000 On Mon, Nov 23, 2009 at 01:26:53PM +0100, Dag-Erling Sm??rgrav wrote: > Luigi Rizzo 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...