Skip to content

main/arm-trusted-firmware: fix build on gcc 12

E=0 is for:

In file included from plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:20:
In function 'mmio_read_8',
    inlined from 'imx8mq_soc_info_init' at plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:70:16,
    inlined from 'bl31_platform_setup' at plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:208:2:
include/lib/mmio.h:19:16: error: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Werror=array-bounds]
   19 |         return *(volatile uint8_t*)addr;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~

LDFLAGS="-no-warn-rwx-segment" is for:

ld.bfd: warning: /builds/alpine/aports/main/arm-trusted-firmware/src/arm-trusted-firmware-2.7.0/build/imx8mq/release/bl31/bl31.elf has a LOAD segment with RWX permissions
make: *** [Makefile:1306: /builds/alpine/aports/main/arm-trusted-firmware/src/arm-trusted-firmware-2.7.0/build/imx8mq/release/bl31/bl31.elf] Error 1

See !39695 (comment 265915)

Merge request reports

Loading