The gnugp1 package fails to build with gcc-10 This is a direct result of gcc defaulting to -fno-common, see also https://gcc.gnu.org/gcc-10/porting_to.html.
A simple but somewhat ugly fix was to tweak the build options to restore the previous behaviour, this is what Fedora did in https://src.fedoraproject.org/rpms/gnupg1/c/a44e9b1c0c362891cb4a3a1f992e73dd614cb31b?branch=master. However, I would prefer a nicer approach. Rewriting the code might become somewhat bigger work, I tried a few things but no luck. So I'd prefer to enhance the definition of EXTERN_UNLESS_MAIN_MODULE as for example:
--- a/g10/options.h +++ b/g10/options.h @@ -29,6 +29,8 @@ /* Norcraft can't cope with common symbols */ #if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE) #define EXTERN_UNLESS_MAIN_MODULE extern +#elif defined (__GNUC__) && __GNUC__ >= 10 +#define EXTERN_UNLESS_MAIN_MODULE __attribute__((__common__)) #else #define EXTERN_UNLESS_MAIN_MODULE #endif
Thoughts?