On 2020-08-22, Dimitry Andric <d...@freebsd.org> wrote: > It can be worked around by adding -fcommon to the compilation flags, but > in most cases it should not be too difficult to get rid of the multiply > defined symbols.
Right. In C, a global is _defined_ in one object file and _declared_ when it is referenced from elsewhere. See Kernighan & Ritchie. Commons are a linker artifact that was never part of the C language, as far as I can tell. Most instances turned up by -fno-common are accidental double definitions of the same global, so you only need to turn the extra definitions into declarations. However, in some cases they were actually intended as separate variables and have been merged by accident. In those cases, they should be renamed or made local with "static". -- Christian "naddy" Weisgerber na...@mips.inka.de _______________________________________________ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"