u-boot/arch
Marek Vasut 3f7afddc9c ARM: imx: bootaux: Fix LTO -Wlto-type-mismatch
Commit 56c2dbdaba ("imx: bootaux: cleanup code") introduces the
following LTO related warning:

"
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:1590:24: note: array types have different bounds
 1590 | const struct rproc_att hostmap[] = {
      |                        ^
arch/arm/mach-imx/imx8m/soc.c:1590:24: note: ‘hostmap’ was previously declared here
../aarch64-linux-gnu/bin/ld: warning: u-boot has a LOAD segment with RWX permissions
"

This is because the weak empty array of structures "hostmap" is eventually
replaced by non-empty array of structures with different number of elements.
Fix this by avoiding weak variable size array, instead use a weak function
which returns single pointer to the array.

Fixes: 56c2dbdaba ("imx: bootaux: cleanup code")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2023-01-30 23:23:02 +01:00
..
arc arc: Migrate ARC_MMU_VER to Kconfig 2023-01-20 12:27:06 -05:00
arm ARM: imx: bootaux: Fix LTO -Wlto-type-mismatch 2023-01-30 23:23:02 +01:00
m68k global: Finish CONFIG -> CFG migration 2023-01-20 12:27:24 -05:00
microblaze microblaze: spl: drop boot_linux 2023-01-27 08:38:34 +01:00
mips global: Finish CONFIG -> CFG migration 2023-01-20 12:27:24 -05:00
nios2 Convert CONFIG_STANDALONE_LOAD_ADDR to Kconfig 2022-12-22 10:31:48 -05:00
powerpc global: Finish CONFIG -> CFG migration 2023-01-20 12:27:24 -05:00
riscv global: Finish CONFIG -> CFG migration 2023-01-20 12:27:24 -05:00
sandbox test: Add test for mapping IOMMUs for PCI devices 2023-01-27 14:47:58 -05:00
sh global: Migrate CONFIG_BOARDDIR to CFG 2022-12-23 10:07:03 -05:00
x86 global: Finish CONFIG -> CFG migration 2023-01-20 12:27:24 -05:00
xtensa global: Migrate CONFIG_MAX_MEM_MAPPED to CFG 2022-12-23 10:14:51 -05:00
.gitignore
Kconfig event: Correct dependencies on the EVENT framework 2023-01-18 12:46:13 -05:00
Kconfig.nxp nxp: Finish migration of SYS_FSL_SRDS_[12] to Kconfig 2023-01-20 12:27:23 -05:00
u-boot-elf.lds