https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94739
Bug ID: 94739 Summary: GCC won't build on CET enabled Linux OS Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap Assignee: unassigned at gcc dot gnu.org Reporter: hjl.tools at gmail dot com Target Milestone: --- [hjl@gnu-tgl-1 build-x86_64-linux]$ readelf -n /bin/ld 2>&1|more Displaying notes found in: .note.gnu.property Owner Data size Description GNU 0x00000030 NT_GNU_PROPERTY_TYPE_0 Properties: x86 feature: IBT, SHSTK x86 ISA used: CMOV, SSE, SSE2 x86 feature used: x86, XMM and I got build-x86_64-linux/./gcc/liblto_plugin.so: indirect branch tracking isn't enabled: Invalid argument collect2: error: ld returned 1 exit status make[7]: *** [Makefile:994: libgcc_s.so] Error 1 Since ld is CET enabled, dlopen failed on liblto_plugin.so since it isn't CET enabled. On CET enabled Linux OS, we need to always enable CET on liblto_plugin.so.