mirror of
https://github.com/apache/nuttx.git
synced 2026-09-28 15:54:57 +08:00
libm: Do not link the toolchain's libm unless explicitly selected
Fix CMake-based build system to include the toolchain's libm only when `CONFIG_LIBM_TOOLCHAIN` is selected. Before this commit, if the user selected `CONFIG_LIBM_NEWLIB`, for instance, the build system would still link the toolchain's libm functions instead of the ones provided by newlib. PS: this commit applies the same changes previously introduced for the other architectures.
This commit is contained in:
committed by
Xiang Xiao
parent
5456668ae8
commit
5358f5b940
@@ -42,7 +42,7 @@ execute_process(
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
OUTPUT_VARIABLE extra_library)
|
||||
list(APPEND EXTRA_LIB ${extra_library})
|
||||
if(NOT CONFIG_LIBM)
|
||||
if(CONFIG_LIBM_TOOLCHAIN)
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_FLAG_ARGS} ${NUTTX_EXTRA_FLAGS}
|
||||
--print-file-name=libm.a
|
||||
|
||||
@@ -42,7 +42,7 @@ execute_process(
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
OUTPUT_VARIABLE extra_library)
|
||||
list(APPEND EXTRA_LIB ${extra_library})
|
||||
if(NOT CONFIG_LIBM)
|
||||
if(CONFIG_LIBM_TOOLCHAIN)
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_FLAG_ARGS} ${NUTTX_EXTRA_FLAGS}
|
||||
--print-file-name=libm.a
|
||||
|
||||
Reference in New Issue
Block a user