mirror of
https://github.com/apache/nuttx.git
synced 2026-09-09 18:36:37 +00:00
The same two differences as in common/Toolchain.defs: the compiler is told -mfdpic -fPIC, and the module link is done by an arm-uclinuxfdpiceabi linker. That linker is not the one that links the firmware, so the module link needs a variable of its own. CMAKE_ELF_LD is the ordinary linker unless the architecture sets it, which arm does under CONFIG_FDPIC. The linker script needs nothing here: it is generated from libs/libc/elf/gnu-elf.ld.in, which both build systems preprocess, and the FDPIC segments are already in it. -r is now conditional on CONFIG_PIC being off, which is what common/Toolchain.defs has always done and the cmake build did not: a position independent module is linked as an executable, and an FDPIC one as a shared object, so neither wants it. -fno-use-cxa-atexit mirrors CXXELFFLAGS for the same reason it was added there. Configured and built mps3-an547:picostest with CONFIG_FDPIC through cmake and ninja: the modules in bin/ are ARM FDPIC with two PT_LOAD segments. Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com> |
||
|---|---|---|
| .. | ||
| menuconfig.cmake | ||
| nuttx_3rdparty.cmake | ||
| nuttx_add_application.cmake | ||
| nuttx_add_dependencies.cmake | ||
| nuttx_add_library.cmake | ||
| nuttx_add_module.cmake | ||
| nuttx_add_romfs.cmake | ||
| nuttx_add_subdirectory.cmake | ||
| nuttx_add_symtab.cmake | ||
| nuttx_create_symlink.cmake | ||
| nuttx_export_header.cmake | ||
| nuttx_extensions.cmake | ||
| nuttx_generate_headers.cmake | ||
| nuttx_generate_outputs.cmake | ||
| nuttx_generate_sim_ld.cmake | ||
| nuttx_kconfig.cmake | ||
| nuttx_mkconfig.cmake | ||
| nuttx_mkversion.cmake | ||
| nuttx_multiple_link.cmake | ||
| nuttx_overrides.cmake | ||
| nuttx_parse_function_args.cmake | ||
| nuttx_process_config.cmake | ||
| nuttx_redefine_symbols.cmake | ||
| nuttx_remove_compile_options.cmake | ||
| nuttx_sethost.cmake | ||
| nuttx_source_file_properties.cmake | ||
| nuttx_toolchain.cmake | ||
| savedefconfig.cmake | ||
| symtab.c.in | ||