Le lundi 29 septembre 2014, 13:39:27 Issam Anour a écrit : > Hi; > > I didn't manage to build a simple Hello world program statically. > > main.c > > #include <stdio.h> > > int main(int argc, char* argv[]) { > > printf("Hello world!\n"); > return 0; > } > > tcc -static main.c -o main > > output: > > tcc: error: undefined symbol '__rel_iplt_end' > tcc: error: undefined symbol '__rel_iplt_start' > tcc: error: undefined symbol '__gcc_personality_v0' > tcc: error: undefined symbol '_Unwind_Resume' > tcc: error: undefined symbol '_Unwind_GetIP' > tcc: error: undefined symbol '_Unwind_GetGR' > tcc: error: undefined symbol '_Unwind_GetCFA' > tcc: error: undefined symbol '_Unwind_Backtrace' > > > What is the issue ? i have googled and find that libgcc_eh.a is missing, but > when i like against it using :
Static compilation of executable with tcc is sadly broken for a long time. > tcc /usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/libgcc_eh.a -static > main.c -o main > > I get the same error. If you want missing symbol to be resolved from this library it should be last on the command line. Something like: tcc -L/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/ -static main.c - lgcc_eh.a > > How to resolve the issue ? If this require to build glibc using tcc than i > didn't manage because the errors from the configure script i already > mentioned in a previous message. Honnestly I doubt you can compile glibc with tcc. It probably relies on a lot of GCC specific behavior and anyway, the support for inline assembly in tcc is not complete. I think we would all welcome any patch to improve this if you are motivated but trying to compile glibc will likely lead to an important quantity of fixes. > Thank you very much. > > Best regards Best regards, Thomas
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel