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

            Bug ID: 126766
           Summary: bootstrap-lto-lean failed on mingw targets if
                    --enable-plugin
           Product: gcc
           Version: 16.2.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: ---

--enable-plugin adds -Wl,--export-all-symbols and -Wl,[email protected] to
PLUGINLIBS on mingw hosts, so that a plugin can resolve back into the compiler
it is loaded by. These options are also passed to frontends that do not install
compiler-proper import libraries.

With bootstrap-lto-lean, their PE export tables can exceed the 16-bit ordinal
limit and some LTO symbols cannot be exported with their resulting types.

Almost all frontends exceed the 65535 limit under bootstrap-lto-lean, including
gnat1, f951, lto1, lto-dump, libgccjit, cc1obj, cc1objplus, cc1, cc1plus.

gnat1 exceeds the limit even without bootstrap-lto-lean. See
https://github.com/msys2/MINGW-packages/pull/30736

f951, lto1, lto-dump, cc1obj, and cc1objplus can be workarounded by define a
backend library list without the mingw plugin export options, as they don't
install import libraries.

libgccjit can be workarounded by reuse libgccjit.exports to generate
libgccjit.def, then only exports a subset of symbols.

cc1 and cc1plus do install import libraries, and I currently haven't found a
proper solution for this.
  • [Bug bootstrap/126766] New: ... dragon-archer at outlook dot com via Gcc-bugs

Reply via email to