Hi,

On Sun, 17 Jan 2021, Sandro Mani wrote:

I'm working on updating the mingw toolchain for Fedora, and am building mingw-gcc-11 with mingw-crt-8.0.0. I'm stuck at this error when linking libgcc [1]:

/usr/i686-w64-mingw32/bin/ld: _ctors_s.o:libgcc2.c:(.bss+0x0): multiple definition of `__DTOR_LIST__'; /usr/i686-w64-mingw32/sys-root/mingw/lib/../lib/dllcrt2.o:crtdll.c:(.dtors+0x0): first defined here /usr/i686-w64-mingw32/bin/ld: _ctors_s.o:libgcc2.c:(.bss+0x8): multiple definition of `__CTOR_LIST__'; /usr/i686-w64-mingw32/sys-root/mingw/lib/../lib/dllcrt2.o:crtdll.c:(.ctors+0x0): first defined here

Indeed, I see

mingw-w64-crt/crt/crtdll.c:__attribute__ (( __section__ (".dtors"), __used__ , aligned(sizeof(void *)))) const void * __DTOR_LIST__ = (void *) -1; mingw-w64-crt/crt/crtdll.c:__attribute__ (( __section__ (".ctors"), __used__ , aligned(sizeof(void *)))) const void * __CTOR_LIST__ = (void *) -1;

These are within an #ifndef HAVE_CTOR_LIST. During configure (of mingw-w64-crt), there's an "checking whether the linker provides __CTOR_LIST__... yes". If you're running into such an error, it sounds to me like this test didn't produce the expected result in your case. Can you have a look in the config.log why it didn't behave as expected?

At this point, this check is only needed for compatibiltiy with LLD 7 and earlier (2 years ago). We could also conclude that it was early times for LLD's mingw compatibility and we could safely drop compatibility with it now.

// Martin



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to