tinycc-devel
[Top][All Lists]
Advanced

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

Re: Mirror (was: Re: [Tinycc-devel] Bounds checking)


From: Julian Brown
Subject: Re: Mirror (was: Re: [Tinycc-devel] Bounds checking)
Date: Sat, 30 Nov 2002 21:56:24 +0000
User-agent: Mutt/1.3.23i

On Sat, Nov 30, 2002 at 10:10:13AM -0500, Joe Klemmer wrote:
> On Sat, 2002-11-30 at 09:10, Nigel Horne wrote:
> 
>       I am sorry about the mirror situation.  I have not been able to build
> the RPM as I keep getting errors on the make(see below).  And as for the
> difficulty of getting into it, that's because of the Red Hat (and a few
> other distors) that are mirrored there.  I am getting a second server
> just to handle the mirroring so once that is up things should be better.
> 
> This is what happens when I try to make tcc -
> 
> $ make
> rm -f *~ *.o tcc tcc1 tcct tcc_g tcctest.ref *.bin *.i ex2 \
>            core gmon.out test.out test.ref a.out tcc_p \
>            *.exe iltcc iltcc_g tcc-doc.html \
>            tcctest[1234] test[1234].out
> gcc -O2 -g -Wall -m386 -malign-functions=0
> -DCONFIG_TCC_PREFIX=\"/usr/local\" -o tcc_g tcc.c -ldl
> In file included from tcc.c:8213:
> tccelf.c: In function `resolve_sym':
> tccelf.c:381: `RTLD_DEFAULT' undeclared (first use in this function)
> tccelf.c:381: (Each undeclared identifier is reported only once
> tccelf.c:381: for each function it appears in.)
> make: *** [tcc_g] Error 1
> 
> If anyone can kick this thing and make it work I'll get an rpm of 0.9.14
> up.

This can be fixed (I think) by adding this line from
/usr/include/dlfcn.h to tccelf.c:

  # define RTLD_DEFAULT ((void *) 0)

#including the whole header file doesn't work because there's an #ifdef
__USE_GNU ... #endif around it.

If anyone's interested, I made a start at porting tcc to an
architecture I'm designing for my research (I'm a Ph.D. student). It's
"sort of" a bit like an ARM/MIPS/simple RISC processor, so the work
might be useful as a starting point for porting to any of those
sorts of architectures.

I gave up eventually anyway, because it seemed like tcc didn't believe
that lvalues could live in registers, which meant that the ABI I wanted
to use (first four function args in registers) couldn't really be done
with any sort of efficiency, and I didn't really understand the source
code to tcc tremendously well. I got it to the point where it could
compile (well, output assembly language code for) very simple
functions, wrongly ;-)

Almost forgot: well done for tcc, it's pretty miraculous I reckon ;-)

Cheers,

Jules




reply via email to

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