mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 17:48:54 +08:00
build: fix syscall instrumentation in flat build
This fixes syscall instrumentation in flat build: - add syscall_names.c if LIB_SYSCALL=n to 'wraps' subdirectory - change execute_process to add_custom_command - fix typo in wrapper naming convention Signed-off-by: Daniel Jasinski <jasinskidaniel95szcz@gmail.com>
This commit is contained in:
committed by
Xiang Xiao
parent
ea5bb64f42
commit
9798bc1d1f
@@ -42,11 +42,9 @@ endif()
|
|||||||
if(CONFIG_SCHED_INSTRUMENTATION_SYSCALL)
|
if(CONFIG_SCHED_INSTRUMENTATION_SYSCALL)
|
||||||
if(CONFIG_LIB_SYSCALL)
|
if(CONFIG_LIB_SYSCALL)
|
||||||
target_sources(proxies PRIVATE syscall_names.c)
|
target_sources(proxies PRIVATE syscall_names.c)
|
||||||
|
target_sources(stubs PRIVATE syscall_names.c)
|
||||||
else()
|
else()
|
||||||
target_sources(proxies PRIVATE syscall_names.c)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(CONFIG_SCHED_INSTRUMENTATION_SYSCALL)
|
|
||||||
add_subdirectory(wraps)
|
add_subdirectory(wraps)
|
||||||
|
target_sources(wraps PRIVATE syscall_names.c)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -19,14 +19,15 @@
|
|||||||
# ##############################################################################
|
# ##############################################################################
|
||||||
nuttx_add_kernel_library(wraps)
|
nuttx_add_kernel_library(wraps)
|
||||||
|
|
||||||
list(TRANSFORM SYSCALLS PREPEND "${CMAKE_CURRENT_BINARY_DIR}/WRAPS_")
|
list(TRANSFORM SYSCALLS PREPEND "${CMAKE_CURRENT_BINARY_DIR}/WRAP_")
|
||||||
|
|
||||||
# generate files
|
# generate files
|
||||||
execute_process(
|
add_custom_command(
|
||||||
OUTPUT ${SYSCALLS}
|
OUTPUT ${SYSCALLS}
|
||||||
COMMAND ${CMAKE_BINARY_DIR}/bin/mksyscall -w
|
COMMAND ${CMAKE_BINARY_DIR}/bin/mksyscall -w
|
||||||
${CMAKE_CURRENT_LIST_DIR}/../syscall.csv
|
${CMAKE_CURRENT_LIST_DIR}/../syscall.csv
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DEPENDS nuttx_host_tools)
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
DEPENDS mksyscall)
|
||||||
|
|
||||||
# TODO: SYSCALLWRAPS = syscall_wraps.ldcmd $(Q) $(CPP) $(CPPFLAGS)
|
# TODO: SYSCALLWRAPS = syscall_wraps.ldcmd $(Q) $(CPP) $(CPPFLAGS)
|
||||||
# $(SYSCALLWRAPS:.ldcmd=.h) | \ sed -e '1,/WRAPOPTSTARTS/d' -e '/^#/d' >
|
# $(SYSCALLWRAPS:.ldcmd=.h) | \ sed -e '1,/WRAPOPTSTARTS/d' -e '/^#/d' >
|
||||||
|
|||||||
Reference in New Issue
Block a user