https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127929

            Bug ID: 127929
           Summary: [17 Regression] MinGW bootstrap fails building libgomp
                    after e5efa9eff99
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dragon-archer at outlook dot com
  Target Milestone: ---

A native x86_64-w64-mingw32 bootstrap on Windows (MSYS2 UCRT64) fails
starting with commit e5efa9eff99da897f0bbd69455d8f7856985b2db:

    libgomp: Revise libgomp/Fortran support conditionals

The regression has been isolated to this commit.

During stage1 libgomp configuration, the log reports:

    libtool.m4: error: problem compiling FC test program

Later, when linking libgomp.la with the CC tag, libtool copies the DLL
to libgomp.lib and then attempts to use that file as a static archive:

    libtool: link: (cd ".libs" && rm -f "libgomp.lib" && cp -pR "libgomp-1.dll"
"libgomp.lib")
    ar.exe: .libs/libgomp.lib: file format not recognized
    make[5]: *** [Makefile:742: libgomp.la] Error 1
    make[2]: *** [Makefile:23592: all-stage1-target-libgomp] Error 2

The commit removes the executable check for GFORTRAN and assigns
FC="$GFORTRAN" unconditionally. The failed Fortran probe appears to
affect libtool's library naming even for subsequent CC-tag linking.

CI log:

[e5efa9eff99, failed]
https://github.com/dragon-archer/gcc-for-windows/actions/runs/38856529370/job/116829646439
[e5efa9eff99's parent, succeeded]
https://github.com/dragon-archer/gcc-for-windows/actions/runs/38856458747/job/116829334707

Reply via email to