When compiling with the recommended array size for Nvidia Grace CPU Superchip I get the following error:
$ armclang stream.c -DSTREAM_ARRAY_SIZE=240000000/tmp/stream-01a87c.o: in function `main':stream.c:(.text+0x5b0): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against `.bss'stream.c:(.text+0x66c): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against `.bss'stream.c:(.text+0x6a4): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against `.bss'stream.c:(.text+0x6e4): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against `.bss'stream.c:(.text+0x740): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against `.bss'stream.c:(.text+0x7b0): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against `.bss'armclang: error: linker command failed with exit code 1 (use -v to see invocation)
When I try to use the -mcmodel=large option I then get a different error regarding the use of -fpic.
Is this a known limitation of the current compiler. Other compilers seem to compiler this code without an issue.
Looks very similar to gcc.gnu.org/.../show_bug.cgi