There is a linker bug in tcc of specified version, which was fixed by tcc dev team in commit bcc9137 of mob branch. Unless it gets into gentoo, linking might fail looking for common functions (e.g. strcmp) without clear reason. WORKAROUND: get latest revision from project repository and install it manually. See additional info section for details. Reproducible: Sometimes Steps to Reproduce: Take relatively big project and pray it triggers. Actual Results: Linking fails with random freaky errors missing stdlib functions Expected Results: GCC links same code nicely If you have this trouble try following advice in this message: http://lists.nongnu.org/archive/html/tinycc-devel/2010-10/msg00007.html - the only one I could find so far...
Hi, can you please provide a build.log displaying the error? Thank you
Created attachment 249788 [details] Build log with max verbosity showing linkage failure (In reply to comment #1) > Hi, > > can you please provide a build.log displaying the error? > > Thank you > Depending on what you are compiling. e.g. I have attached one I had when first encountered the bug. The point is the bug is already fixed by the tcc devs, it is just not in release version. I dont think there is a need to actually fix it ASAP, basically we could make a patch or something or just keep this info here until next version (whoever needs tcc could install workaround)
Created attachment 303997 [details, diff] patch from upstream commit that applies I can confirm it on x86. Attaching patch that works for me. It's simply upstream patch (the same as mentioned by you) that applies against tcc 0.9.25. Btw. to reproduce, one can try something like: #include <string.h> int main() { strlen("x"); return 0; }
This should be fixed in 0.9.26.