On Thu, Oct 26, 2023 at 07:15:11PM +0200, draco wrote:
> Sylvain,
>
> it seems to me, like this patch breaks the windows builds, maybe for
> exactly the same reason, ldd gets confused.
>
> See the github mirror of tinycc, it has some automated builds and the
> win32 part starts breaking with linker errors against libtcc exactly
> after picking up your patch:
>
> https://github.com/TinyCC/tinycc/actions
Hi,
I don't understand, this patch modifies only ELF relocatable generation, this
is unrelated to win32 PE/COFF file generation. Additionally, cproc/qbe
compilers are generating similar ELF relocatable files, meaning they would
break too.
I cannot get more information since your github link is "empty", this github
"feature" does not seem to work with the noscript/basic (x)html browsers I
use.
regards,
--
Sylvain
tcc uses the elf structure also to generate the windows binaries, so the STT_NOTYPE is carried over to the windows dll.
But maybe the cause is different, memtest and dlltest also fail.
I can't test this locally, because I don't have msys installed.
In the buildlog on github, it's especially the abitest-tcc that fails with segmentation fault.
The relevant part of the makefile
# Check that code generated by libtcc is binary compatible with
# that generated by CC
abitest-cc.exe: abitest.c $(LIBTCC)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS) -w
abitest-tcc.exe: abitest.c libtcc.c
$(TCC) -o $@ $^ $(NATIVE_DEFINES) $(LIBS)
abitest-% : abitest-%.exe
@echo ------------ $@ ------------
./$< $(TCCFLAGS)
and the relevant part of the build-log
Segfaults start here and carry on through the whole log
running tcc.c in threads to run fib
make[2]: *** [Makefile:92: libtest_mt] Segmentation fault
------------ test3 ------------
make[2]: *** [Makefile:124: test3] Error 139
------------ memtest ------------
make[2]: *** [Makefile:174: memtest] Segmentation fault
------------ dlltest ------------
make[2]: *** [Makefile:160: dlltest] Segmentation fault
------------ abitest-cc ------------
ret_int_test... success
ret_longlong_test... success
ret_float_test... success
ret_double_test... success
ret_longdouble_test... success
ret_2float_test... success
ret_2double_test... success
ret_8plus2double_test... success
ret_6plus2longlong_test... success
ret_mixed_test... success
ret_mixed2_test... success
ret_mixed3_test... success
reg_pack_test... success
reg_pack_longlong_test... success
sret_test... success
one_member_union_test... success
two_member_union_test... success
many_struct_test... success
many_struct_test_2... success
many_struct_test_3... success
stdarg_test... success
stdarg_many_test... success
stdarg_struct_test... success
arg_align_test... success
------------ abitest-tcc ------------
make[2]: *** [Makefile:247: abitest-tcc] Segmentation fault
make[2]: *** Deleting file 'abitest-tcc'
make[2]: Target 'abitest' not remade because of errors.
Michael