Home » Developing U++ » UppHub » New Tiny C Compiler Package
Re: New Tiny C Compiler Package [message #26455 is a reply to message #26452] |
Tue, 04 May 2010 09:24 |
|
koldo
Messages: 3357 Registered: August 2008
|
Senior Veteran |
|
|
Didier wrote on Mon, 03 May 2010 22:28 | Hi Koldo,
why stdlib is included in a separate .a lib instead of being statically compiled with rest of tcc.
Before sending the previous post I made some tests myself, and the problem is not really dependent on the stdlib.
In the tccelf.c file L1031, the stdlib is requested ... but not only: An explicit link to /usr/local/lib/tcc/libtcc1.a is made.
==> If this file is not present on the system then an exception is thrown
==> So although everything needed was compiled and linked, the program refuse to execute. if you comment L1031 & L1032 everything works fine.
I don't know why this has been done, but for our particular usage it's not good.
|
Hello Didier
In last change sent yesterday I have added two patches:
- NoStdlib() function
void NoStdlib(TCCState *s) {
s->nostdlib = 1;
}
This effectively avoids to try to load libtcc1.a, as in tccelf.c you can see this:
if (!s1->nostdlib) {
tcc_add_library(s1, "c");
snprintf(buf, sizeof(buf), "%s/%s", tcc_lib_path, "libtcc1.a");
tcc_add_file(s1, buf);
}
- For linux, constructor is now Tcc::Tcc(const char *libPath).
libPath is assigned to tcc_lib_path. This way you can put libtcc1.a wherever you want, instead of in "/usr/local/lib/tcc".
For convenience it is included in Tcc/lib/lib a copy of libtcc1.a file.
You can try both options, or using NoStdlib(), or using libtcc1.a file indicating in constructor in what folder it is (you do not need to install tcc, you just need to indicate where libtcc1.a is)
Best regards
IƱaki
|
|
|
|
|
New Tiny C Compiler Package
By: koldo on Wed, 24 June 2009 08:21
|
|
|
Re: New Tiny C Compiler Package
|
|
|
Re: New Tiny C Compiler Package
By: koldo on Sun, 28 June 2009 16:28
|
|
|
Re: New Tiny C Compiler Package
By: ptDev on Fri, 03 July 2009 16:50
|
|
|
Re: New Tiny C Compiler Package
By: koldo on Fri, 03 July 2009 18:02
|
|
|
Re: New Tiny C Compiler Package
By: ptDev on Sat, 04 July 2009 08:58
|
|
|
Re: New Tiny C Compiler Package
By: Didier on Sat, 04 July 2009 11:06
|
|
|
Re: New Tiny C Compiler Package
By: koldo on Mon, 13 July 2009 09:25
|
|
|
Re: New Tiny C Compiler Package
By: Didier on Mon, 13 July 2009 10:06
|
|
|
Re: New Tiny C Compiler Package
By: koldo on Mon, 13 July 2009 10:44
|
|
|
Re: New Tiny C Compiler Package
By: koldo on Wed, 15 July 2009 23:28
|
|
|
Re: New Tiny C Compiler Package
By: kasome on Sat, 08 August 2009 17:28
|
|
|
Re: New Tiny C Compiler Package
By: koldo on Sun, 09 August 2009 17:30
|
|
|
Re: New Tiny C Compiler Package
By: koldo on Wed, 12 August 2009 23:46
|
|
|
Re: New Tiny C Compiler Package
By: koldo on Thu, 13 August 2009 08:34
|
|
|
Re: New Tiny C Compiler Package
By: kasome on Fri, 14 August 2009 14:34
|
|
|
Re: New Tiny C Compiler Package
By: Didier on Sat, 01 May 2010 12:59
|
|
|
Re: New Tiny C Compiler Package
By: koldo on Sun, 02 May 2010 19:53
|
|
|
Re: New Tiny C Compiler Package
By: Didier on Sun, 02 May 2010 23:15
|
|
|
Re: New Tiny C Compiler Package
By: koldo on Mon, 03 May 2010 08:22
|
|
|
Re: New Tiny C Compiler Package
By: koldo on Mon, 03 May 2010 21:27
|
|
|
Re: New Tiny C Compiler Package
By: Didier on Mon, 03 May 2010 22:28
|
|
|
Re: New Tiny C Compiler Package
By: koldo on Tue, 04 May 2010 09:24
|
|
|
TCC package broken
By: Didier on Wed, 12 October 2011 22:57
|
|
|
Re: TCC package broken
By: koldo on Thu, 13 October 2011 09:09
|
|
|
Re: TCC package broken
By: Didier on Thu, 13 October 2011 20:02
|
|
|
Re: TCC package broken
By: koldo on Thu, 13 October 2011 21:43
|
|
|
Re: TCC package broken
By: Didier on Tue, 18 October 2011 22:55
|
|
|
Re: TCC package broken
By: koldo on Wed, 19 October 2011 13:44
|
Goto Forum:
Current Time: Fri Apr 26 20:47:30 CEST 2024
Total time taken to generate the page: 0.03075 seconds
|