tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] using pcc to build tcc


From: Michael Matz
Subject: Re: [Tinycc-devel] using pcc to build tcc
Date: Fri, 15 Apr 2016 18:54:55 +0200 (CEST)
User-agent: Alpine 2.20 (LSU 67 2015-01-07)

Hi,

On Fri, 15 Apr 2016, Sergey Korshunoff wrote:

> pcc -o i386-tcc tcc.c -DONE_SOURCE -DTCC_TARGET_I386 -I.  -Wall -g -O0 -lm 
> -ldl
> /tmp/ctm.Uao6qA: In function `set_pages_executable':
> tccrun.c:238: undefined reference to `__clear_cache'
> error: ld terminated with status 1
> 
> But it is OK if we add lib/libtcc1.c

That might break when building with other compilers again, because 
libtcc1.c is the support routines for tcc, not for pcc or for e.g. GCC.  
So if pcc doesn't provide a __clear_cache implementation then it, and only 
it needs to be implemented by something in tcc.

So, the implementation of __clear_cache (and only it!) needs to be 
provided by tcc itself, but only when compiling with pcc.  I.e. some file 
splitting would be in order.


Ciao,
Michael.
(But why bother with pcc at all?)



reply via email to

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