Swatantra-66 commented on issue #19509:
URL: https://github.com/apache/nuttx/issues/19509#issuecomment-6231602486
Hi @casaroli,
I have submitted a fix for this in #20711:
1. Passes `${PICFLAGS} -mpic-register=r9` to `nuttx_elf_compile_options` in
`arch/arm/src/cmake/elf.cmake` under `CONFIG_PIC`, ensuring ELF applications
receive position-independent flags and silencing the compiler warning.
2. Caches `PICFLAGS` in `gcc.cmake` and reserves `r9` (`-ffixed-r9`) in the
base firmware under `CONFIG_PIC` across GCC and Clang via a generator
expression targeting non-ELF objects.
3. Sets `ELF_BINARY TRUE` on `STARTUP_OBJS` (`crt0.c`) in
`arch/arm/src/common/CMakeLists.txt` so startup code retains access to `r9`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]