mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2025-12-10 07:14:36 +01:00
make newlib the default
This commit is contained in:
parent
bf670a8a32
commit
d13a84ff70
1 changed files with 5 additions and 6 deletions
|
|
@ -44,8 +44,11 @@ endforeach()
|
||||||
list(APPEND CMAKE_TRY_COMPILE_PLATFORM_VARIABLES PICO_CLIB)
|
list(APPEND CMAKE_TRY_COMPILE_PLATFORM_VARIABLES PICO_CLIB)
|
||||||
|
|
||||||
set(_PICO_CLIB_PATH "${PICO_COMPILER_DIR}/../lib/clang-runtimes/arm-none-eabi")
|
set(_PICO_CLIB_PATH "${PICO_COMPILER_DIR}/../lib/clang-runtimes/arm-none-eabi")
|
||||||
if(PICO_CLIB STREQUAL "")
|
if(PICO_CLIB STREQUAL "" OR PICO_CLIB STREQUAL "newlib")
|
||||||
# use default from above
|
# newlib is 1st class choice
|
||||||
|
if(EXISTS "${PICO_COMPILER_DIR}/../lib/clang-runtimes/newlib/arm-none-eabi")
|
||||||
|
set(_PICO_CLIB_PATH "${PICO_COMPILER_DIR}/../lib/clang-runtimes/newlib/arm-none-eabi")
|
||||||
|
endif()
|
||||||
elseif(PICO_CLIB STREQUAL "llvm_libc")
|
elseif(PICO_CLIB STREQUAL "llvm_libc")
|
||||||
if(EXISTS "${PICO_COMPILER_DIR}/../lib/clang-runtimes/llvmlibc/arm-none-eabi")
|
if(EXISTS "${PICO_COMPILER_DIR}/../lib/clang-runtimes/llvmlibc/arm-none-eabi")
|
||||||
set(_PICO_CLIB_PATH "${PICO_COMPILER_DIR}/../lib/clang-runtimes/llvmlibc/arm-none-eabi")
|
set(_PICO_CLIB_PATH "${PICO_COMPILER_DIR}/../lib/clang-runtimes/llvmlibc/arm-none-eabi")
|
||||||
|
|
@ -54,10 +57,6 @@ elseif(PICO_CLIB STREQUAL "picolibc")
|
||||||
if(EXISTS "${PICO_COMPILER_DIR}/../lib/clang-runtimes/picolibc/arm-none-eabi")
|
if(EXISTS "${PICO_COMPILER_DIR}/../lib/clang-runtimes/picolibc/arm-none-eabi")
|
||||||
set(_PICO_CLIB_PATH "${PICO_COMPILER_DIR}/../lib/clang-runtimes/picolibc/arm-none-eabi")
|
set(_PICO_CLIB_PATH "${PICO_COMPILER_DIR}/../lib/clang-runtimes/picolibc/arm-none-eabi")
|
||||||
endif()
|
endif()
|
||||||
elseif(PICO_CLIB STREQUAL "newlib")
|
|
||||||
if(EXISTS "${PICO_COMPILER_DIR}/../lib/clang-runtimes/newlib/arm-none-eabi")
|
|
||||||
set(_PICO_CLIB_PATH "${PICO_COMPILER_DIR}/../lib/clang-runtimes/newlib/arm-none-eabi")
|
|
||||||
endif()
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "PICO_CLIB must be one of newlib, picolib, llvm_libc or empty (but is '${PICO_CLIB}')")
|
message(FATAL_ERROR "PICO_CLIB must be one of newlib, picolib, llvm_libc or empty (but is '${PICO_CLIB}')")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue