https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108630
Bug ID: 108630 Summary: build failure with LTO enabled Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: a.heider at gmail dot com Target Milestone: --- This is happening when attempting to build a cross compiler with: CFLAGS_FOR_TARGET="-flto=auto -ffat-lto-objects" LDFLAGS_FOR_TARGET="-flto=auto -fuse-linker-plugin" The assembler errors out when building libstdc++ with: Error: invalid attempt to declare external version name as default in symbol `_ZNSt19istreambuf_iteratorIcSt11char_traitsIcEEppEv@@GLIBCXX_3.4.5' The build succeed when building with an additional --enable-symvers=no on top. libstdc++ may need the same treatment as seen e.g. here: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=f4be26838dc9937a4ae3e9cf4fbec50efd7786a2