tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Error: File crti.o/crt1.o Not Found and No Function R


From: Thomas Preud'homme
Subject: Re: [Tinycc-devel] Error: File crti.o/crt1.o Not Found and No Function Renaming
Date: Sun, 15 Sep 2013 21:03:09 +0200
User-agent: KMail/4.10.5 (Linux/3.10-2-amd64; KDE/4.10.5; x86_64; ; )

Le vendredi 13 septembre 2013 18:43:14 Cayce Pollard a écrit :
> I'm once again testing a build of tcc on my device by compiling SCM.
> Determined to get this working
> 
> /home/kbox/devel/scm $ tcc -vv scm.c
> tcc version 0.9.26 (ARM Linux)
> tcc: error: file 'crt1.o' not found
> tcc: error: file 'crti.o' not found
> -> scm.c
> -> /usr/include/signal.h
> ->  /usr/include/sys/cdefs.h
> ->   /usr/include/sys/cdefs_elf.h
> In file included from scm.c:24:
> In file included from /usr/include/signal.h:31:
> /usr/include/sys/cdefs.h:252: error: #error "No function renaming possible"
> /home/kbox/devel/scm $
> 
> 1) There are crt* files on my device, but they are not crt1.o or crti.o.

What are they?

> When building tcc for my device, I specified the crt location and included
> crtbegin_dynamic and crtend_android to --extra-ldflags during configure.
> Why is tcc complaining about crti.o and crt1.o?

--extra-ldflags is to set the LDFLAGS to be used during compilation of tcc. It 
doesn't affect the behavior of tcc but the behavior of the compiler compiling 
tcc. What you seem to want here is that tcc link the extra files 
crtbegin_dynamic and crtent_android to each program generated.

Anyway, crti.o and crt1.o are hardcoded in tcc so you'd have to change the 
code to look for files named differently.


> 
> 2) Is there a way to indicate to cdefs.h that compiler implements C99
> without editing cdefs.h?

It should already be done. See function tcc_new in libtcc.c:

    /* standard defines */
    tcc_define_symbol(s, "__STDC__", NULL);
    tcc_define_symbol(s, "__STDC_VERSION__", "199901L");
    tcc_define_symbol(s, "__STDC_HOSTED__", NULL);

If you could paste the relevant bits (around line 252) of file 
/usr/include/sys/cdefs.h we could help you more efficiently.

Best regards,

Thomas Preud'homme

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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