mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +08:00
cmake:bugfix refine sim cmake redefine symbols
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
242b50f921
commit
f8437d52b7
+1
-1
@@ -727,7 +727,7 @@ else()
|
|||||||
${nuttx_libs_paths} ${nuttx_extra_libs}
|
${nuttx_libs_paths} ${nuttx_extra_libs}
|
||||||
$<$<NOT:$<BOOL:${APPLE}>>:-Wl,--end-group> -o nuttx.rel
|
$<$<NOT:$<BOOL:${APPLE}>>:-Wl,--end-group> -o nuttx.rel
|
||||||
COMMAND ${CMAKE_OBJCOPY} --redefine-syms=nuttx-names.dat nuttx.rel
|
COMMAND ${CMAKE_OBJCOPY} --redefine-syms=nuttx-names.dat nuttx.rel
|
||||||
DEPENDS ${nuttx_libs} ${nuttx_extra_libs} sim_head
|
DEPENDS ${nuttx_libs} ${nuttx_extra_libs} sim_head sim_redefine_symbols
|
||||||
COMMAND_EXPAND_LISTS)
|
COMMAND_EXPAND_LISTS)
|
||||||
endif()
|
endif()
|
||||||
add_custom_target(nuttx-rel DEPENDS nuttx.rel
|
add_custom_target(nuttx-rel DEPENDS nuttx.rel
|
||||||
|
|||||||
@@ -18,129 +18,13 @@
|
|||||||
#
|
#
|
||||||
# ##############################################################################
|
# ##############################################################################
|
||||||
|
|
||||||
set(NXSYMBOLS
|
set(REDEFINE_INPUT_FILE ${NUTTX_DIR}/arch/sim/src/nuttx-names.in)
|
||||||
__cxa_atexit
|
set(REDEFINE_OUTPUT_FILE ${CMAKE_BINARY_DIR}/nuttx-names.dat)
|
||||||
abort
|
|
||||||
accept
|
|
||||||
access
|
|
||||||
atexit
|
|
||||||
backtrace
|
|
||||||
bind
|
|
||||||
calloc
|
|
||||||
chmod
|
|
||||||
chown
|
|
||||||
clock_gettime
|
|
||||||
close
|
|
||||||
closedir
|
|
||||||
connect
|
|
||||||
dlsym
|
|
||||||
dup
|
|
||||||
exit
|
|
||||||
fchmod
|
|
||||||
fchown
|
|
||||||
fclose
|
|
||||||
fcntl
|
|
||||||
fdopen
|
|
||||||
fopen
|
|
||||||
fprintf
|
|
||||||
fread
|
|
||||||
free
|
|
||||||
fseek
|
|
||||||
fstat
|
|
||||||
fsync
|
|
||||||
ftell
|
|
||||||
ftruncate
|
|
||||||
futimens
|
|
||||||
fwrite
|
|
||||||
getpeername
|
|
||||||
getsockname
|
|
||||||
getenv
|
|
||||||
getpid
|
|
||||||
getsockopt
|
|
||||||
if_nametoindex
|
|
||||||
ioctl
|
|
||||||
listen
|
|
||||||
longjmp
|
|
||||||
lseek
|
|
||||||
malloc
|
|
||||||
malloc_size
|
|
||||||
malloc_usable_size
|
|
||||||
memcpy
|
|
||||||
mkdir
|
|
||||||
mmap
|
|
||||||
mprotect
|
|
||||||
munmap
|
|
||||||
open
|
|
||||||
opendir
|
|
||||||
perror
|
|
||||||
poll
|
|
||||||
posix_memalign
|
|
||||||
pthread_attr_init
|
|
||||||
pthread_attr_setstack
|
|
||||||
pthread_attr_destroy
|
|
||||||
pthread_cond_destroy
|
|
||||||
pthread_cond_init
|
|
||||||
pthread_cond_signal
|
|
||||||
pthread_cond_wait
|
|
||||||
pthread_create
|
|
||||||
pthread_getspecific
|
|
||||||
pthread_key_create
|
|
||||||
pthread_kill
|
|
||||||
pthread_mutex_destroy
|
|
||||||
pthread_mutex_init
|
|
||||||
pthread_mutex_lock
|
|
||||||
pthread_mutex_unlock
|
|
||||||
pthread_setspecific
|
|
||||||
pthread_sigmask
|
|
||||||
puts
|
|
||||||
read
|
|
||||||
readdir
|
|
||||||
readv
|
|
||||||
realloc
|
|
||||||
recvfrom
|
|
||||||
rename
|
|
||||||
rewinddir
|
|
||||||
rmdir
|
|
||||||
sched_yield
|
|
||||||
select
|
|
||||||
sendmsg
|
|
||||||
sendto
|
|
||||||
setitimer
|
|
||||||
setbuf
|
|
||||||
setjmp
|
|
||||||
setsockopt
|
|
||||||
shutdown
|
|
||||||
sigaction
|
|
||||||
sigaddset
|
|
||||||
sigemptyset
|
|
||||||
sigfillset
|
|
||||||
sleep
|
|
||||||
socket
|
|
||||||
stat
|
|
||||||
statvfs
|
|
||||||
stderr
|
|
||||||
strcat
|
|
||||||
strchr
|
|
||||||
strerror
|
|
||||||
strlen
|
|
||||||
strtol
|
|
||||||
sysconf
|
|
||||||
syslog
|
|
||||||
tcgetattr
|
|
||||||
tcsetattr
|
|
||||||
unlink
|
|
||||||
usleep
|
|
||||||
utimensat
|
|
||||||
write
|
|
||||||
writev)
|
|
||||||
|
|
||||||
set(NXSYMBOL_RENAMES)
|
add_custom_command(
|
||||||
foreach(NXSYMBOL ${NXSYMBOLS})
|
OUTPUT ${REDEFINE_OUTPUT_FILE}
|
||||||
if(APPLE OR (CYGWIN AND CONFIG_SIM_CYGWIN_DECORATED))
|
COMMAND ${CMAKE_C_COMPILER} -E -P -x c -I${CMAKE_BINARY_DIR}/include
|
||||||
list(APPEND NXSYMBOL_RENAMES "_${NXSYMBOL} NX${NXSYMBOL}")
|
${REDEFINE_INPUT_FILE} > ${REDEFINE_OUTPUT_FILE}
|
||||||
else()
|
DEPENDS nuttx_context ${REDEFINE_INPUT_FILE})
|
||||||
list(APPEND NXSYMBOL_RENAMES "${NXSYMBOL} NX${NXSYMBOL}")
|
|
||||||
endif()
|
add_custom_target(sim_redefine_symbols DEPENDS ${REDEFINE_OUTPUT_FILE})
|
||||||
endforeach()
|
|
||||||
string(REPLACE ";" "\n" NXSYMBOL_RENAMES "${NXSYMBOL_RENAMES}")
|
|
||||||
file(WRITE ${CMAKE_BINARY_DIR}/nuttx-names.dat "${NXSYMBOL_RENAMES}\n")
|
|
||||||
|
|||||||
Reference in New Issue
Block a user