mirror of
https://github.com/apache/nuttx.git
synced 2026-08-20 21:18:23 +00:00
arch/x86_64: define CMAKE_LD and CMAKE_STRIP for ELF applications
CMAKE_LD was never set, so application link commands were invalid, and CMAKE_STRIP defaulted to plain 'strip', which removes the symbol and relocation tables required to load CONFIG_BINFMT_ELF_RELOCATABLE binaries. Use the host linker and 'strip --strip-unneeded' as on the other architectures. Signed-off-by: raiden00pl <raiden00@railab.me> Assisted-by: Claude Code
This commit is contained in:
parent
e13fb3d8c1
commit
3e142bbced
1 changed files with 6 additions and 0 deletions
|
|
@ -27,6 +27,12 @@ set(CMAKE_SYSTEM_VERSION 1)
|
|||
|
||||
set(ARCH_SUBDIR intel64)
|
||||
|
||||
# host toolchain linker and strip, used for standalone ELF applications;
|
||||
# --strip-unneeded keeps the symbols required for relocation processing
|
||||
# (CONFIG_BINFMT_ELF_RELOCATABLE binaries are loaded from ET_REL objects)
|
||||
set(CMAKE_LD ld)
|
||||
set(CMAKE_STRIP strip --strip-unneeded)
|
||||
|
||||
# override the ARCHIVE command
|
||||
set(CMAKE_ARCHIVE_COMMAND "<CMAKE_AR> rcs <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||
set(CMAKE_RANLIB_COMMAND "<CMAKE_RANLIB> <TARGET>")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue