https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90543
Bug ID: 90543 Summary: Build failure on MINGW for gcc-9.1.0 Product: gcc Version: 9.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap Assignee: unassigned at gcc dot gnu.org Reporter: baue.flor.dev at gmail dot com Target Milestone: --- Created attachment 46385 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46385&action=edit Occured error Hello team, the following problem (see attatchment GCCBuildError.PNG) occured during a gcc-9.1.0 build on MINGW. I used 64-bit windows 7 as host system. host=x86_64-w64-mingw32 build=$host target=aarch64-elf targetlocal=mingw32 builddir=/build/${target}_9.1.0_x64 prefix=$builddir/cross-gcc/$target prefixlocal=$builddir/host Build commands: --host=$host --build=$build --prefix=$prefix --target=$target --disable-nls --enable-multilib --with-multilib-list=lp64,ilp32 --enable-languages=c,c++,d --disable-decimal-float --with-sysroot=$prefix --without-headers --disable-shared --disable-threads --disable-lto --disable-libmudflap --disable-libssp --disable-libgomp --disable-libffi --disable-libstdcxx-pch --disable-win32-registry '--with-host-libstdcxx=-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-newlib --with-gcc --with-gnu-as --with-gnu-ld --with-gmp=$prefixlocal --with-mpfr=$prefixlocal --with-mpc=$prefixlocal --with-isl=$prefixlocal The file options-save.c contains invalid cast operations. Casting to (uintptr_t) instead of (unsigned long) may solve the issue. Info: options-save.c is auto-generated by optc-save-gen.awk. I used the following fix in my case: --- options-save.org.c 2019-05-20 12:52:48 +0000 +++ options-save.c 2019-05-20 11:36:06 +0000 @@ -3906,7 +3906,7 @@ fprintf (file, "%*s%s (%#lx)\n", indent, "", "aarch64_branch_protection_string", - (unsigned long)ptr->x_aarch64_branch_protection_string); + (uintptr_t)ptr->x_aarch64_branch_protection_string); if (ptr->x_target_flags) fprintf (file, "%*s%s (%#lx)\n", @@ -3973,8 +3973,8 @@ fprintf (file, "%*s%s (%#lx/%#lx)\n", indent, "", "aarch64_branch_protection_string", - (unsigned long)ptr1->x_aarch64_branch_protection_string, - (unsigned long)ptr2->x_aarch64_branch_protection_string); + (uintptr_t)ptr1->x_aarch64_branch_protection_string, + (uintptr_t)ptr2->x_aarch64_branch_protection_string); Greetings, Bauer Florian