On Thu, Oct 15, 2015 at 03:20:36AM +0300, Henri Tuhola wrote: > I get these weird errors when I try to compile tcc in musl > environment. musl+tcc also had stdarg.h -issue because musl expects > __builtin_va_start & pals.
About stdargs: I guess you are aware of http://www.openwall.com/lists/musl/2014/08/15/6 and http://www.openwall.com/lists/musl/2014/08/15/7 which resums my discussion with Rich Felker about stdarg implementations. IOW it is certainly possible to use tcc with musl (do not remember whether I tested this on x86_64 but the 32-bit one worked fine) but musl can theoretically any time become incompatible with the compiler setup and as Rich pointed out, the additional functions make the object files incompatible with non-tcc toolchains. Nevertheless, as long as tcc is not being used to produce long-lived object files (iow they never leave the scope of one toolchain) stdarg in a proper configuration should work. > The environment was minimal and I issued the commands to compile musl by hand. It looks like you meant "compile tcc" (musl can not be compiled by tcc). > /tcc-nonmod # tcc -o tcc tcc.c -lm -ldl libtcc.c tccpp.c tccgen.c > tccelf.c tccasm.c tccrun.c x86_64-gen.c i386-asm.c -DCONFIG_TCC > _ELFINTERP="\"/lib/ld-musl-x86_64.so.1\"" -DTCC_TARGET_X86_64 > > When I run my new binary, musl answers with this: > > Error relocating ./tcc: cstr_buf: symbol not found I am not sure such a minimal setup can work (given the stdarg limitation) but I lack the time to look deeper. Hope somebody else can answer. Rune _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
