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:
parent
5456668ae8
commit
5358f5b940
2 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue