Hi,

We have recently observed Linux kernel build failures while using SDK
toolchain (built using gcc-cross-canadian_<version>.bb) especially
after upstream changed the way to detect presence of GCC plugins here
[1]. Logs below:

  HOSTCXX scripts/gcc-plugins/arm_ssp_per_task_plugin.so
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/sorttable
  HOSTCC  scripts/asn1_compiler
  SYSNR   arch/arm/include/generated/asm/unistd-nr.h
  GEN     arch/arm/include/generated/asm/mach-types.h
  SYSTBL  arch/arm/include/generated/calls-oabi.S
  SYSTBL  arch/arm/include/generated/calls-eabi.S
  HOSTCC  scripts/mod/mk_elfconfig
  CC      scripts/mod/empty.o
cc1: error: cannot load plugin ./scripts/gcc-plugins/arm_ssp_per_task_plugin.so
   ./scripts/gcc-plugins/arm_ssp_per_task_plugin.so: undefined symbol:
_ZN8opt_pass14set_pass_paramEjb
make[1]: *** [scripts/Makefile.build:280: scripts/mod/empty.o] Error 1
make: *** [Makefile:1214: prepare0] Error 2

This is reproducible with current OE core dunfell (gcc9.3) and
honister (gcc 11). But strangely this issue is not seen while building
kernel as part of OE build using normal cross toolchain (built using
gcc-cross_<version>.bb).

I have tried to compare the two recipes: gcc-cross_<version>.bb and
gcc-cross-canadian_<version>.bb but can't find anything explicit which
can cause this behaviour. Also, following hack does disable GCC
plugins detection during kernel build leading to a successful build:

diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index 553ef7fe62..5529932472 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -73,8 +73,6 @@ FILES_${PN} = "\
     ${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \
     ${gcclibdir}/${TARGET_SYS}/${BINV}/include \
     ${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \
-    ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/include/ \
-    ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/gtype.* \
     ${includedir}/c++/${BINV} \
     ${prefix}/${TARGET_SYS}/bin/* \
     ${prefix}/${TARGET_SYS}/lib/* \

Thoughts?

[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1e860048c53ee77ee9870dcce94847a28544b753

Regards,
Sumit
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#162877): 
https://lists.openembedded.org/g/openembedded-core/message/162877
Mute This Topic: https://lists.openembedded.org/mt/89633477/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to