Does gcc have different inlining heuristics on different platforms?
Eric Botcazou
botcazou@adacore.com
Mon Mar 31 19:15:37 GMT 2025
> You can see what -fuse-linker-plugin says, what gcc/auto-host.h contains
> for HAVE_LTO_PLUGIN. I don't know whether the BFD linker (or mold)
> supports linker plugins on windows. I do know that libiberty simple-object
> does not support PE, that is, at _least_ (DWARF) debuginfo will be subpar.
Here's an excerpt of a LTO compilation with -Wl,--verbose=2 on native Windows:
C:/GNATPRO/25.1/bin/../lib/gcc/x86_64-w64-mingw32/13.3.1/../../../../x86_64-
w64-mingw32/bin/ld.exe: C:\tmp\ccCnskmU.o (symbol from plugin): symbol `fma'
definition: DEF, visibility: DEFAULT, resolution: PREVAILING_DEF_IRONLY
C:/GNATPRO/25.1/bin/../lib/gcc/x86_64-w64-mingw32/13.3.1/../../../../x86_64-
w64-mingw32/bin/ld.exe: C:\tmp\ccCnskmU.o (symbol from plugin): symbol `main'
definition: DEF, visibility: DEFAULT, resolution: PREVAILING_DEF
C:/GNATPRO/25.1/bin/../lib/gcc/x86_64-w64-mingw32/13.3.1/../../../../x86_64-
w64-mingw32/bin/ld.exe: C:\tmp\ccCnskmU.o (symbol from plugin): symbol
`__fpclassify' definition: UNDEF, visibility: DEFAULT, resolution:
RESOLVED_EXEC
attempt to open C:\tmp\ccbENa6D.ltrans0.ltrans.o succeeded
C:\tmp\ccbENa6D.ltrans0.ltrans.o
This is with GNU ld.
--
Eric Botcazou
More information about the Gcc
mailing list