https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118495
--- Comment #6 from Brecht Sanders <brechtsanders at users dot sourceforge.net> --- Sorry it took me a while to get the hang of building a canadian cross from Linux. When building gdc for Windows 64-bit I get the following: make[2]: Entering directory '/home/brecht/build-gcc/build_stage2-gcc-x86_64-w64-mingw32/gcc' x86_64-w64-mingw32-g++ -no-pie -g -O2 -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-error=narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -no-pie -static-libstdc++ -static-libgcc -Wl,--stack,12582912 -Wl,--undefined=HOST_EXTRA_OBJS_SYMBOL -o cc1.exe c/c-lang.o c-family/stub-objc.o attribs.o c/c-errors.o c/c-decl.o c/c-typeck.o c/c-convert.o c/c-aux-info.o c/c-objc-common.o c/c-parser.o c/c-fold.o c/gimple-parser.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-indentation.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o c-family/c-ubsan.o c-family/known-headers.o c-family/c-attribs.o c-family/c-warn.o c-family/c-spellcheck.o c-family/c-type-mismatch.o i386-c.o winnt-c.o msformat-c.o \ cc1-checksum.o libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a ../libbacktrace/.libs/libbacktrace.a ../libiberty//libiberty.a ../libdecnumber/libdecnumber.a -L/home/brecht/build-gcc/gcc-x86_64-w64-mingw32/lib -lisl -L/home/brecht/build-gcc/gcc-x86_64-w64-mingw32/lib -L/home/brecht/build-gcc/gcc-x86_64-w64-mingw32/lib -L/home/brecht/build-gcc/gcc-x86_64-w64-mingw32/lib -L/home/brecht/build-gcc/gcc-x86_64-w64-mingw32/lib -L/home/brecht/build-gcc/gcc-x86_64-w64-mingw32/lib -L/home/brecht/build-gcc/gcc-x86_64-w64-mingw32/lib -lmpc -lmpfr -lgmp -L./../zlib -lz /home/brecht/build-gcc/gcc-cross/lib/gcc/x86_64-w64-mingw32/15.0.1/../../../../x86_64-w64-mingw32/bin/ld: ../libbacktrace/.libs/libbacktrace.a(fileline.o): in function `fileline_initialize': /home/brecht/build-gcc/build_stage2-gcc-x86_64-w64-mingw32/libbacktrace/../../gcc-15-20250119/libbacktrace/fileline.c:263:(.text+0x232): undefined reference to `__imp___p__pgmptr' collect2: error: ld returned 1 exit status make[2]: *** [../../gcc-15-20250119/gcc/c/Make-lang.in:87: cc1.exe] Error 1 make[2]: Leaving directory '/home/brecht/build-gcc/build_stage2-gcc-x86_64-w64-mingw32/gcc' make[1]: *** [Makefile:4693: all-gcc] Error 2 make[1]: Leaving directory '/home/brecht/build-gcc/build_stage2-gcc-x86_64-w64-mingw32' make: *** [Makefile:1056: all] Error 2