Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

librem5: workaround atf bug on some compilers #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Danct12
Copy link
Member

@Danct12 Danct12 commented Jul 21, 2022

According to @craftyguy, there's a bug with GCC 12.1 that caused the compilation to fail:

+ make PLAT=imx8mq CROSS_COMPILE=aarch64-linux-gnu- bl31
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: Entering directory '/tmp/Jumpdrive/build/u-boot/librem5/arm-trusted-firmware'
  CC      plat/imx/imx8mq/imx8mq_bl31_setup.c
  CC      plat/imx/imx8mq/src.c
In file included from plat/imx/imx8mq/src.c:13:
In function 'mmio_read_8',
    inlined from 'imx_soc_handler' at plat/imx/imx8mq/src.c:59:16:
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;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~
In function 'mmio_read_8',
    inlined from 'imx_soc_handler' at plat/imx/imx8mq/src.c:61:17:
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;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:711: build/imx8mq/release/bl31/src.o] Error 1
make[1]: Leaving directory '/tmp/Jumpdrive/build/u-boot/librem5/arm-trusted-firmware'
make: *** [Makefile:247: u-boot-librem5.bin] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant