casaroli commented on code in PR #20723: URL: https://github.com/apache/nuttx/pull/20723#discussion_r4321814766
########## libs/libc/tls/CMakeLists.txt: ########## @@ -20,7 +20,20 @@ # # ############################################################################## -set(SRCS task_getinfo.c tls_getinfo.c) +set(SRCS task_getinfo.c tls_getinfo.c tls_emutls.c) + +# Take the emutls functions from libc, not from libgcc: the apps refer to them +# only after the linker has scanned libc (see tools/Config.mk). + +if(CONFIG_ARCH_TOOLCHAIN_GCC AND NOT CONFIG_ARCH_SIM) Review Comment: Done. ########## libs/libc/tls/CMakeLists.txt: ########## @@ -20,7 +20,20 @@ # # ############################################################################## -set(SRCS task_getinfo.c tls_getinfo.c) +set(SRCS task_getinfo.c tls_getinfo.c tls_emutls.c) + +# Take the emutls functions from libc, not from libgcc: the apps refer to them +# only after the linker has scanned libc (see tools/Config.mk). + +if(CONFIG_ARCH_TOOLCHAIN_GCC AND NOT CONFIG_ARCH_SIM) Review Comment: Now the sim has it with GCC and the GNU linker (Linux, MinGW): the sim links NuttX into `nuttx.rel` with `--wrap`, and `nuttx-names.in` renames the weak real names, so the host program keeps its own libgcc copy. The macOS linker and the MSVC linker have no `--wrap`, so `CONFIG_TLS_EMUTLS` stays off there, and `nuttx/tls.h` has no GNU-only types for MSVC. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
