Closed jer-gentoo closed 4 years ago
Thanks for the patch!
I’ll just be nitpicky on the commit message: although I don’t always succeed, I try to describe the actual issue in the summary for this kind of fixes. The flag breaking the build is a symptom here. I would go with “Avoid a possible multiple definition”, what do you think?
Also, I use "nd:" as the prefix (IOW, just the plugin name), "plugins:" is for commits that affects many plugins at once for a generic change.
I adjusted the commit message.
Perfect! Thanks again :-)
With the GCC -fno-common flag, enabled by default in GCC >=10, the linker fails with messages like these:
ld: plugins/nd/1b87e75@@nd@sha/src_notification.c.o:(.bss+0x0): multiple definition of
eventd_nd_backends_names'; plugins/nd/1b87e75@@nd@sha/src_nd.c.o:(.data.rel.local+0x20): first defined here ld: plugins/nd/1b87e75@@nd@sha/src_backends.c.o:(.bss+0x0): multiple definition of
eventd_nd_backends_names'; plugins/nd/1b87e75@@nd@sha/src_nd.c.o:(.data.rel.local+0x20): first defined here collect2: error: ld returned 1 exit statusFix this by declaring eventd_nd_backends_names as extern.
Signed-off-by: Jeroen Roovers jer@gentoo.org