imx_bootaux lto issue
Marcel Ziswiler
marcel.ziswiler at toradex.com
Thu Aug 18 18:19:52 CEST 2022
Hi there
If one enables both CONFIG_IMX_BOOTAUX and CONFIG_LTO (e.g. just adding the later to the verdin-
imx8mp_defconfig) one gets the following build failure:
arch/arm/mach-imx/imx_bootaux.c:24:31: warning: type of ‘hostmap’ does not match original declaration [-Wlto-
type-mismatch]
24 | const __weak struct rproc_att hostmap[] = { };
| ^
arch/arm/mach-imx/imx8m/soc.c:1578:24: note: array types have different bounds
1578 | const struct rproc_att hostmap[] = {
| ^
arch/arm/mach-imx/imx8m/soc.c:1578:24: note: ‘hostmap’ was previously declared here
This is with Arm's gcc 10.3-2021.07 (arm-10.29).
I tried the approach with adding pragmas around it e.g. as follows:
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wlto-type-mismatch"
const __weak struct rproc_att hostmap[] = { };
#pragma GCC diagnostic pop
But that does not seem to improve the situation. Is anybody more familiar with this stuff and what exactly
needs to be done to fix this?
Thanks!
Cheers
Marcel
More information about the U-Boot
mailing list