https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100293
--- Comment #7 from Brecht Sanders <brechtsanders at users dot sourceforge.net> --- I ran the following commands based on what was in config.log cat > conftest.c << EOF /* confdefs.h */ #define PACKAGE_NAME "GNU Atomic Library" #define PACKAGE_TARNAME "libatomic" #define PACKAGE_VERSION "1.0" #define PACKAGE_STRING "GNU Atomic Library 1.0" #define PACKAGE_BUGREPORT "" #define PACKAGE_URL "http://www.gnu.org/software/libatomic/" #define PACKAGE "libatomic" #define VERSION "1.0" /* end confdefs.h. */ int main () { ; return 0; } EOF /R/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/./gcc/xgcc -B/R/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/./gcc/ -B/R/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/bin/ -B/R/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/lib/ -isystem /R/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/include -isystem /R/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/sys-include -g -O2 conftest.c -v and the result was: Reading specs from R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/specs COLLECT_GCC=R:\winlibs32_stage\gcc-offload-nvptx-11.1.0\gcc-11.1.0\build_win_offload-nvptx\gcc\xgcc.exe COLLECT_LTO_WRAPPER=R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/lto-wrapper.exe Target: nvptx-none Configured with: ../configure --prefix=/R/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc --build=i686-w64-mingw32 --host=i686-w64-mingw32 --target=nvptx-none --enable-as-accelerator-for=i686-w64-mingw32 --with-pkgversion='built by Brecht Sanders' --with-build-time-tools=/d/Prog/winlibs32_stage/custombuilt/share/nvptx-tools/nvptx-none/bin --with-gnu-as --with-gnu-ld --disable-serial-configure --enable-checking=release --without-libbacktrace --without-included-gettext --without-cuda-driver --enable-multiarch --enable-newlib-io-long-long --enable-linker-build-id --enable-multilib --disable-sjlj-exceptions --disable-libunwind-exceptions --disable-libgomp --enable-languages=c,c++,lto,objc,obj-c++,d Thread model: single Supported LTO compression algorithms: zlib zstd gcc version 11.1.0 (built by Brecht Sanders) COLLECT_GCC_OPTIONS='-B' 'R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/' '-B' 'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/bin/' '-B' 'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/lib/' '-isystem' 'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/include' '-isystem' 'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/sys-include' '-g' '-O2' '-v' '-dumpdir' 'a-' R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/cc1.exe -quiet -v -iprefix r:\winlibs32_stage\gcc-offload-nvptx-11.1.0\gcc-11.1.0\build_win_offload-nvptx\gcc\../lib/gcc/i686-w64-mingw32/11.1.0D:/Prog/msys64/accel/nvptx-none/ -isystem R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/include -isystem R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/include-fixed -isystem R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/include -isystem R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/sys-include conftest.c -quiet -dumpdir a- -dumpbase conftest.c -dumpbase-ext .c -g -O2 -version -o R:\winlibs32_stage\_TMP_\ccu9TSoP.s GNU C17 (built by Brecht Sanders) version 11.1.0 (nvptx-none) compiled by GNU C version 11.1.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.23-GMP GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring nonexistent directory "R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/include" ignoring nonexistent directory "R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/sys-include" ignoring nonexistent directory "r:\winlibs32_stage\gcc-offload-nvptx-11.1.0\gcc-11.1.0\build_win_offload-nvptx\gcc\../lib/gcc/i686-w64-mingw32/11.1.0D:/Prog/msys64/accel/nvptx-none/include" ignoring nonexistent directory "r:\winlibs32_stage\gcc-offload-nvptx-11.1.0\gcc-11.1.0\build_win_offload-nvptx\gcc\../lib/gcc/i686-w64-mingw32/11.1.0D:/Prog/msys64/accel/nvptx-none/include-fixed" ignoring nonexistent directory "r:\winlibs32_stage\gcc-offload-nvptx-11.1.0\gcc-11.1.0\build_win_offload-nvptx\gcc\../lib/gcc/i686-w64-mingw32/11.1.0D:/Prog/msys64/accel/nvptx-none/../../../../../../nvptx-none/sys-include" ignoring nonexistent directory "r:\winlibs32_stage\gcc-offload-nvptx-11.1.0\gcc-11.1.0\build_win_offload-nvptx\gcc\../lib/gcc/i686-w64-mingw32/11.1.0D:/Prog/msys64/accel/nvptx-none/../../../../../../nvptx-none/include" ignoring nonexistent directory "r:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/lib/gcc/i686-w64-mingw32/11.1.0/accel/nvptx-none/include" ignoring nonexistent directory "r:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/lib/gcc/i686-w64-mingw32/11.1.0/accel/nvptx-none/include-fixed" ignoring nonexistent directory "r:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/nvptx-none/sys-include" ignoring nonexistent directory "r:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/nvptx-none/include" #include "..." search starts here: #include <...> search starts here: R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/include R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/include-fixed D:\Prog\winlibs32_stage\custombuilt\include D:\Prog\winlibs32_stage\mingw32\include End of search list. GNU C17 (built by Brecht Sanders) version 11.1.0 (nvptx-none) compiled by GNU C version 11.1.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.23-GMP GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 8ee8c6ba1ff9d5a1ffe98751099bf036 COLLECT_GCC_OPTIONS='-B' 'R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/' '-B' 'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/bin/' '-B' 'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/lib/' '-isystem' 'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/include' '-isystem' 'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/sys-include' '-g' '-O2' '-v' '-dumpdir' 'a-' R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/as -v -m sm_35 -o R:\winlibs32_stage\_TMP_\ccYJWYIt.o R:\winlibs32_stage\_TMP_\ccu9TSoP.s COMPILER_PATH=R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/ LIBRARY_PATH=R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/ COLLECT_GCC_OPTIONS='-B' 'R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/' '-B' 'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/bin/' '-B' 'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/lib/' '-isystem' 'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/include' '-isystem' 'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/sys-include' '-g' '-O2' '-v' '-dumpdir' 'a.' R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/collect2.exe -LR:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc R:\winlibs32_stage\_TMP_\ccYJWYIt.o -lgcc -lg -lc -lgcc error reading R:\winlibs32_stage\_TMP_\ccYJWYIt.o collect2.exe: error: ld returned 1 exit status So the missing file should have been geenrated by gcc/as I was expecting to find gcc/as.exe in my build folder, but instead gcc/as is a shell script. I very much doubt this can be executed as-is on Windows, even in MSYS2 shell, as the code executing it would need to know about the shebang header and that that needs to be executed by running sh.exe