Open mikrosk opened 6 days ago
Didn't we have something similar already? I guess its mostly the filenames of the object files that are different. Every object file in an archive has its (possibly absolute) filename recorded, independant of any debug options.
Ok, and? My absolute paths differ by a couple of characters between the builds? Where the additional 100 KB of libc.a came from then? I'm not linking 100 000 files there. ;)
Still difficult to tell. You really should check the individual object files, not the whole library. Also note that the archives on my site were compiled with gcc 7.5.0, not gcc 13.3
You could extract the object files from both libraries again, disassemble them using objdump, then do a diff on the result. I would only worry if there are really substantial differences. But this is still possible, i might have some patches in my branch that are not in vincents.
You really should check the individual object files
mintlib's build/m68000/*.o compiled by your gcc: 944 248 bytes in 842 files mintlib's build/m68000/*.o compiled by our gcc: 848 136 bytes in 842 files
(all stripped down)
I have also checked that pure asm files (like bzero.S or bcopy.S) are the same. So it seems worth looking into.
Also note that the archives on my site were compiled with gcc 7.5.0, not gcc 13.3
That implies that whatever is causing the bigger size is also present in your gcc-7 tree.
I suggest you to display the list of the sections and their sizes with this command:
m68k-atari-mintelf-objdump -h somefile.o
Then we will clearly see the differences.
(reporting here as https://github.com/th-otto/m68k-atari-mint-gcc doesn't have the Issues tab and @th-otto reads this anyway)
While trying to verify how similar output of Thorsten's and "our" gcc is, I compiled his tree and our tree side by side. Both versions are 13.3.0 ELF, same binutils, same support libraries, same versions, same flags, same everything. To my surprise, Thorsten's gcc produces much larger libraries, e.g. (all stripped with
m68k-atari-mintelf-strip -s
):854884 libc.a (68000 libc.a in our gcc) vs 949284 libc.a (68000 libc.a in Thorsten's gcc) ... about 100 KB difference! 246004 libm.a (68020-60 libm.a in our gcc) vs 278008 libm.a (68020-60 libm.a in Thorsten's gcc) ... about 30 KB difference!
I have also verified that mintlib and fdlibm available on Thorsten's website have similar sizes after stripping. So there is definitely something wrong.
Interestingly, a massive C++ project (ScummVM): 28 553K (ours) vs 28 545K (Thorsten's) gives a slightly worse result in our gcc, not sure how to interpret this. Just for the sake of completeness, Thorsten's gcc's
-mfastcall
produces an executable of size 26 583K, i.e. about 2 MB smaller.Full list of sysroot's lib folder for comparison: