> On Dez 01 2023, Richard Biener via Gcc wrote: > > > Hmm, so why's it then referenced and not "GCed"? > > This has nothing to do with garbage collection. It's just the way > libgcc avoids having too many source files. It would be exactly the > same if every function were in its own file.
THe ifdef machinery makes every function to go insto its own .o file which are then archived. So if user code never calls to fork, the .o file with fork wrapper should not be picked by linker and we should not have link error. If user code calls fork, then the .o file with wrapper should be picked and we will get linker error on missing fork. So I think it ought to work as it is now. Does mingw linker behave somehow differently with archives? Or is there problem with a libgcov being DLL or something? Honza > > -- > Andreas Schwab, sch...@linux-m68k.org > GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 > "And now for something completely different."