Agathoklis D.E Chatzimanikas wrote:
Hi,
I created a tinycc binding for the S-Lang programming language,
https://github.com/agathoklisx/slang-devel/tree/master/slang-modules/tcc
and while I was trying to create an executable, I had to use:
tcc_set_options (tcc_handler, "-xn");
which sets tcc_handler->filetype to AFF_TYPE_NONE,
otherwise (the path) elf_output_file() -> tcc_add_runtime()
tries to compile /usr/local/lib/tcc/libtcc1.a when it calls
tcc_add_support(s1, TCC_LIBTCC1);
I was wondering if there is a better librar"iezed" way.
I guess that is a bug in tcc.
tcc_add_file() probably should preserve (save/restore) the original
value of s->filetype.
Also, tcc_add_runtime() probably should reset s->filetype to
AFF_TYPE_NONE at entry.
I admit that the filetype stuff isn't really clean but maybe with
these adjustments it could work. If you can fix it on the mob branch,
welcome.
Thanks,
-- grischka
Best
Αγαθοκλής
p.s.,
(note that my C Fu is at a novice level, so be kind for any error :))
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel