From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E61363871030; Wed, 26 Jun 2024 14:15:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E61363871030 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1719411314; bh=H1rqtaR0lVKz+qsQ1Z0JZ+ahx3qr4gAUccmyCiyoPbk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mxjlxo57LFffVcjgGppzOPrmQw84KbUKG8TWo34eHmONNUOUdTonmEwzmhVUx/J0l Fyl2tCWgP7UVl0DoipDdQjPUA2rSHSU2CIvhvsDea4jB3YwmYv3scum3M4wfVlLlBu zsuzsbCBBUPdZSmTZszORyGCoGC6s2I0ScSzihTM= From: "slyfox at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/115643] aarch64-w64-mingw32 support today breaks x86_64-w64-mingw32 build cannot represent relocation type BFD_RELOC_64 Date: Wed, 26 Jun 2024 14:15:14 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 15.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: slyfox at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D115643 --- Comment #3 from Sergei Trofimovich --- I got a similar failure for `--target=3Di686-w64-mingw32`. It is probably slightly dependent on system headers and binutils version. Mine is binutils-2.42. I extracted the following self-contained example to crash the build: // $ cat __main.c.c extern void *__CTOR_LIST__[]; void __do_global_dtors() { if (__CTOR_LIST__[0]) for (;;) ; } Crashing: $ gcc/xgcc -Bgcc/ -fbuilding-libgcc -fno-stack-protector -c __main.c.c -o __main.o -O2 i686-w64-mingw32-as: BFD (GNU Binutils) 2.42 assertion fail coff-i386.c:666 /tmp/ccMxDwki.s: Assembler messages: /tmp/ccMxDwki.s:21: Error: cannot represent relocation type BFD_RELOC_64 I wonder if you can reproduce it with this sample. Compiler details: $ gcc/xgcc -Bgcc/ -v Reading specs from /tmp/nix-build-i686-w64-mingw32-nolibc-gcc-15.0.0.drv-3/build/./gcc/specs COLLECT_GCC=3D/tmp/nix-build-i686-w64-mingw32-nolibc-gcc-15.0.0.drv-3/build= /./gcc/xgcc COLLECT_LTO_WRAPPER=3D/tmp/nix-build-i686-w64-mingw32-nolibc-gcc-15.0.0.drv= -3/build/./gcc/lto-wrapper Target: i686-w64-mingw32 Configured with: ../source/configure --prefix=3D/<>/i686-w64-mingw32-nolibc-gcc-15.0.0 --with-gmp-include=3D/<>/gmp-with-cxx-6.3.0-dev/include --with-gmp-lib=3D/<>/gmp-with-cxx-6.3.0/lib --with-mpfr-include=3D/<>/mpfr-4.2.1-dev/include --with-mpfr-lib=3D/<>/mpfr-4.2.1/lib --with-mpc=3D/<>/libmpc-1.3.1 --program-prefix=3Di686-w64-mingw32- --enable-lto --disable-libstdcxx-pch --without-included-gettext --with-system-zlib --enable-checking=3Drelease --enable-static --enable-languages=3Dc --disable-multilib --disable-shared --enable-plugin --with-isl=3D/<>/isl-0.20 --with-as=3D/<>/i686-w64-mingw32-binutils-wrapper-2.42/bin/i686-w64-mi= ngw32-as --with-ld=3D/<>/i686-w64-mingw32-binutils-wrapper-2.42/bin/i686-w64-mi= ngw32-ld --disable-libssp --disable-nls --without-headers --disable-threads --disable-libgomp --disable-libquadmath --disable-shared --disable-libatomic --disable-decimal-float --disable-libmpx --with-headers=3D/<>/mingw_w64-headers-11.0.1/include --with-gcc --with-gnu-as --with-gnu-ld --disable-debug --disable-win32-registry --enable-hash-synchronization --enable-libssp --disable-nls --enable-fully-dynamic-string --enable-sjlj-exceptions --with-dwarf2 --disable-bootstrap --build=3Dx86_64-unknown-linux-gnu --host=3Dx86_64-unknown-linux-gnu --target=3Di686-w64-mingw32 --with-build-sysroot=3D/build/source/.. Thread model: single Supported LTO compression algorithms: zlib gcc version 15.0.0 99999999 (experimental) (GCC)=