https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80600
--- Comment #10 from coypu <coypu at sdf dot org> --- (In reply to H.J. Lu from comment #9) > > This may break Linux. You may want to investigate if this approach: > > commit 6e6c7fc1e15525a10f48d4f5ac2edd853e2f5cb7 > Author: nsz <nsz@138bc75d-0d04-0410-961f-82ee72b054a4> > Date: Fri Nov 11 17:31:07 2016 +0000 > > [i386][musl] Add cpuinfo to static libgcc only on *-musl* > > The __cpu_indicator_init and __cpu_model symbols are not safe to use > from shared libgcc_s.so from ifunc resolvers, so since gcc-6, only > the definitions from static libgcc.a are used, however the symbols > are kept in libgcc_s as well for backward compatibility (with > appropriate symbol version). On targets without such backward > compatibility concern add cpuinfo to the static library only (this > avoids running the ctor, reduces libgcc_s size and elf abi concerns > about the versioned symbols). > > works for you. Thanks. if I understand it correctly, it breaks backwards compatibility, so would rather avoid it. With my (not upstreamable) patch we have a working GCC, so it's not a pressing issue for us, although it seems to affect many other platforms.