Skip to content

cross-compiling for QNX fails due to nodesize_dbg #84

@asobhy-qnx

Description

@asobhy-qnx

When building for QNX nodesize_dbg needs to execute on target and generate container_node_sizes_impl.hpp. Unfortunately the solution provided using the emulator in PR #60 does not work for QNX. A solution needs to be implemented in order to generate this file manually and provide it during build time.

After running nodesize_dbg on QNX on x86_64 and aarch64 and as well as comparing the output with one generated on a x86_64 linux, I have found that the generated header file is exactly the same across linux and QNX.

A conclusion was made by generating the file natively on the host by adding the following condition to

which allows the header file to be generated on the host platform as long as it is running linux. The file generated on windows was different so if the host is running a windows OS then this method is not going to work.

elseif(QNX) execute_process(COMMAND g++ -DVERSION="${FOONATHAN_MEMORY_VERSION_MAJOR}.${FOONATHAN_MEMORY_VERSION_MINOR}.${FOONATHAN_MEMORY_VERSION_PATCH}" -o ${PROJECT_SOURCE_DIR}/tool/nodesize_dbg ${PROJECT_SOURCE_DIR}/tool/node_size_debugger.cpp ) add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/container_node_sizes_impl.hpp COMMAND ${PROJECT_SOURCE_DIR}/tool/nodesize_dbg --code ${CMAKE_CURRENT_BINARY_DIR}/container_node_sizes_impl.hpp)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions