GCC_PLUGINS Kconfig selection problem on longer paths
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-25 7:26 AM
Hi,
I have custom board running 5.15.24 OpenSTLinux on STM32MP157F based board.
Problem is, when I try to select CONFIG_GCC_PLUGINS. It depends on
depends on $(success,test -e $(shell,$(CC) -print-file-name=plugin)/include/plugin-version.h)
in file
scripts\gcc-plugins\Kconfig
I just can't select it, because evaluation of the conditions is always negative.
I have traced the CC binary and when I run -print-file-name manually on it, plugin-version.h exist on the path.
Problem seems to be with
$(shell
call, which on ST port of Linux always crops output to 256 characters (which results in non existent path, because it points deeply into Yocto build folders)!
I have tried it with
$(shell,echo
and it results in same cropping.
When I try the same thing on my i.MX repository from NXP, output is correct and I can select CONFIG_GCC_PLUGINS correctly.
Any ideas for what is going on?
Thanks in advance,
Michal Spanik
Solved! Go to Solution.
- Labels:
-
OpenSTLinux
-
STM32MP15 Lines
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-02-02 11:21 PM
Investigations done.
The issue comes from an incompatibility between GCC in Yocto SDK and the Kernel "CONFIG_GCC_PLUGINS".
So if you use directly the Yocto distribution, you won't get the issue.
The issue is corrected after kirkstone yocto branch but not yet delivered, so we will backport the patch inside ST kirkstone Yocto delivery and then also part of v4.1.1 OpenSTLinux delivery.
So customers will need to regenerate the SDK from the Distribution to get this correction or to keep "CONFIG_GCC_PLUGINS" is not set from current delivery.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-26 12:23 AM
Hi @Michal Špánik​ ,
Thanks to spot this and your analyze !
I enter an internal ticket BZ143766 to trig our expert on this issue.
I will keep you posted.
Olivier
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-26 8:53 AM
Hello,
I see 2 issues:
- first on V4.0 (your DV), we have seen an issue activating GCC_PLUGGINS config. So we did a temporary workaround to avoid this config: https://github.com/STMicroelectronics/meta-st-stm32mp/blob/openstlinux-5.15-yocto-kirkstone-mp1-v22.07.27/recipes-kernel/make-mod-scripts/make-mod-scripts_%25.bbappend
- This issue was complex and not fully understood during V4.0 delivery but it was understood and removed from V4.1. So if not already done, you can remove it.
- For the second issue (path exceeding 256 char) the only way to solve is to reduce the path of plugin-version.h by optimising your installation directory path length.
Then you should be able to activate this config (hopefully).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-27 12:02 AM
Hello Michal,
I complete the status with bad news.
This config still brings errors in ST kernel and the workaround (to desactivate it by default) moved from recipe on V4.0 to KErnel fragment on V4.1 like below:
0022-v5.15-stm32mp-r2-CONFIG.patch:+# CONFIG_GCC_PLUGINS is not set
fragment-04-modules.config:# CONFIG_GCC_PLUGINS is not set
Investigations are still ongoing ....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-02-02 11:21 PM
Investigations done.
The issue comes from an incompatibility between GCC in Yocto SDK and the Kernel "CONFIG_GCC_PLUGINS".
So if you use directly the Yocto distribution, you won't get the issue.
The issue is corrected after kirkstone yocto branch but not yet delivered, so we will backport the patch inside ST kirkstone Yocto delivery and then also part of v4.1.1 OpenSTLinux delivery.
So customers will need to regenerate the SDK from the Distribution to get this correction or to keep "CONFIG_GCC_PLUGINS" is not set from current delivery.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-02-03 12:12 AM
Thank you very much for investigation and info, I will try it after release.
I have patched KConfig file to remove the "depends on" condition until then (file is there, so it should be safe).
Michal Spanik
