Running the example from tcc documentation: % cat > t.c << EOF #!/usr/bin/tcc -run #include <stdio.h> int main() { printf("Hello World\n"); return 0; } EOF % chmod 755 t.c % ./t.c In file included from ./t.c:2: /usr/include/stdio.h:34: include file 'stddef.h' not found
(tcc 0.9.23)
Created attachment 86051 [details, diff] 0.9.23 ebuild cleanup This patch fixes it, and also makes sure examples get installed correctly. There are still two remaining issues with tcc, however: - tcc doesn't respect either CFLAGS or LDFLAGS - I believe the "#! /usr/bin/env tcc" should actually be "#! /usr/bin/tcc -run"; -run is also used in the manpage. /usr/bin/env tcc -run would be even better but doesn't work because of #! limitations. As tcc won't compile anything though (next point), I can't test it to be sure -run is really needed. - tcc doesn't seem to be compatible with glibc 2.4 (I think that's the problem, anyway): even compiling int main() {} results in tcc: file 'AS_NEEDED' not found /usr/lib/libc.so:3: filename expected /usr/lib/libc.so:3: unrecognized file type tcc: undefined symbol '__gcc_personality_v0' tcc: undefined symbol '_Unwind_Resume' tcc: undefined symbol '_Unwind_Backtrace' tcc: undefined symbol '_Unwind_GetIP' tcc: undefined symbol '_Unwind_GetGR' tcc: undefined symbol '_Unwind_GetCFA'
> - I believe the "#! /usr/bin/env tcc" should actually be "#! /usr/bin/tcc > -run"; -run is also used in the manpage. /usr/bin/env tcc -run would be even > better but doesn't work because of #! limitations. I can now confirm tcc -run is required. > - tcc doesn't seem to be compatible with glibc 2.4 With these two patches, tcc is usable with glibc 2.4: http://lists.gnu.org/archive/html/tinycc-devel/2005-07/msg00008.html http://lists.gnu.org/archive/html/tinycc-devel/2005-08/msg00011.html The examples run. However, I can then get tcc to consistently segfault trying to compile itself.
Created attachment 94853 [details] tcc-0.9.23-r1.ebuild
Created attachment 94854 [details, diff] files/tcc-binutils216.patch
Now it works :)
> Created an attachment (id=94854) [edit] > files/tcc-binutils216.patch > Now it works :) Which glibc are you using? If 2.3*, you shouldn't need the above patch. If 2.4*, you should also need the other patch I mentioned in comment #3.
Several bugs mentioned in here are not yet fixed, but the most important ones are, the original bug is, and tcc is useable now. I think this can be closed, and if anyone (other than myself) cares about the remaining issues, a new bug can be opened.