On Fri, Feb 19, 2021 at 01:27:42PM +0100, Christian Weisgerber wrote:
> Klemens Nanni:
>
> > I went the easy way just like Debian did; the update itself did not
> > change "-fno-common" behaviour, i.e. it's the same twenty files that
> > clash on the `gamgi' symbol.
>
> That's a hint that it's defined in a header file that is included
> everywhere. You just need to mark it extern and copy the definition
> into a *.c file.
Right, but if I mark that symbol `extern' others now show up as well:
$ make build 2>&1 | grep 'duplicate symbol'
ld: error: duplicate symbol: gamgi_chem_property_color
ld: error: duplicate symbol: gamgi_chem_property_ionic
ld: error: duplicate symbol: gamgi_chem_property_ionic_driver
ld: error: duplicate symbol: gamgi_chem_property_mass
ld: error: duplicate symbol: gamgi_chem_property_mass_driver
ld: error: duplicate symbol: gamgi_chem_property_radius
ld: error: duplicate symbol: gamgi_phys_symmetry_driver_1
ld: error: duplicate symbol: gamgi_phys_symmetry_driver_10
ld: error: duplicate symbol: gamgi_phys_symmetry_driver_100
ld: error: duplicate symbol: gamgi_phys_symmetry_driver_101
ld: error: duplicate symbol: gamgi_phys_symmetry_driver_102
ld: error: duplicate symbol: gamgi_phys_symmetry_driver_103
ld: error: duplicate symbol: gamgi_phys_symmetry_driver_104
ld: error: duplicate symbol: gamgi_phys_symmetry_driver_105
ld: error: duplicate symbol: gamgi_phys_symmetry_driver_106
ld: error: duplicate symbol: gamgi_phys_symmetry_driver_107
ld: error: duplicate symbol: gamgi_phys_symmetry_driver_108
ld: error: duplicate symbol: gamgi_phys_symmetry_driver_109
ld: error: duplicate symbol: gamgi_phys_symmetry_driver_11
ld: error: duplicate symbol: gamgi_phys_symmetry_driver_110
I don't want to patch all of those.
> > +# avoid patching twenty occurence of "ld: error: duplicate symbol: gamgi"
> > +COPTS += -fcommon
>
> It's never been quite clear to me how COPTS is to be used, but we
> do not use it in the ports tree.
bsd.port.mk(5) mentions `COPTS' just like `CFLAGS', would you want to
unmention it there?