diff --git a/libs/libc/machine/arm/armv7-a/CMakeLists.txt b/libs/libc/machine/arm/armv7-a/CMakeLists.txt index 05bd859ebe..7744719bb9 100644 --- a/libs/libc/machine/arm/armv7-a/CMakeLists.txt +++ b/libs/libc/machine/arm/armv7-a/CMakeLists.txt @@ -18,8 +18,6 @@ # # ############################################################################## -set(SRCS arch_elf.c) - if(CONFIG_ARCH_TOOLCHAIN_GNU) set(ARCH_TOOLCHAIN_DIR gnu) endif() @@ -48,4 +46,8 @@ if(CONFIG_ARMV7A_STRLEN) list(APPEND SRCS ${ARCH_TOOLCHAIN_DIR}/arch_strlen.S) endif() +if(CONFIG_LIBC_ARCH_ELF) + list(APPEND SRCS arch_elf.c) +endif() + target_sources(c PRIVATE ${SRCS}) diff --git a/libs/libc/machine/arm/armv7-m/CMakeLists.txt b/libs/libc/machine/arm/armv7-m/CMakeLists.txt index e5395a486e..10f7b2b9af 100644 --- a/libs/libc/machine/arm/armv7-m/CMakeLists.txt +++ b/libs/libc/machine/arm/armv7-m/CMakeLists.txt @@ -20,28 +20,36 @@ set(SRCS) +if(CONFIG_ARCH_TOOLCHAIN_GNU) + set(ARCH_TOOLCHAIN_DIR gnu) +endif() + +if(CONFIG_ARMV7M_MEMCHR) + list(APPEND SRCS ${ARCH_TOOLCHAIN_DIR}/arch_memchr.S) +endif() + if(CONFIG_ARMV7M_MEMCPY) - list(APPEND SRCS gnu/arch_memcpy.S) + list(APPEND SRCS ${ARCH_TOOLCHAIN_DIR}/arch_memcpy.S) endif() if(CONFIG_ARMV7M_MEMSET) - list(APPEND SRCS arch_memset.S) + list(APPEND SRCS ${ARCH_TOOLCHAIN_DIR}/arch_memset.S) endif() if(CONFIG_ARMV7M_MEMMOVE) - list(APPEND SRCS arch_memmove.S) + list(APPEND SRCS ${ARCH_TOOLCHAIN_DIR}/arch_memmove.S) endif() if(CONFIG_ARMV7M_STRCMP) - list(APPEND SRCS arch_strcmp.S) + list(APPEND SRCS ${ARCH_TOOLCHAIN_DIR}/arch_strcmp.S) endif() if(CONFIG_ARMV7M_STRCPY) - list(APPEND SRCS arch_strcpy.S) + list(APPEND SRCS ${ARCH_TOOLCHAIN_DIR}/arch_strcpy.S) endif() if(CONFIG_ARMV7M_STRLEN) - list(APPEND SRCS arch_strlen.S) + list(APPEND SRCS ${ARCH_TOOLCHAIN_DIR}/arch_strlen.S) endif() if(CONFIG_LIBC_ARCH_ELF) diff --git a/libs/libc/machine/arm/armv7-r/CMakeLists.txt b/libs/libc/machine/arm/armv7-r/CMakeLists.txt index 62ec1bed47..dbbedfb4da 100644 --- a/libs/libc/machine/arm/armv7-r/CMakeLists.txt +++ b/libs/libc/machine/arm/armv7-r/CMakeLists.txt @@ -18,10 +18,38 @@ # # ############################################################################## +set(SRCS) + +if(CONFIG_ARCH_TOOLCHAIN_GNU) + set(ARCH_TOOLCHAIN_DIR gnu) +endif() + +if(CONFIG_ARMV7R_MEMCHR) + list(APPEND SRCS ${ARCH_TOOLCHAIN_DIR}/arch_memchr.S) +endif() + if(CONFIG_ARMV7R_MEMCPY) - target_sources(c PRIVATE gnu/arch_memcpy.S) + list(APPEND SRCS ${ARCH_TOOLCHAIN_DIR}/arch_memcpy.S) +endif() + +if(CONFIG_ARMV7R_MEMSET) + list(APPEND SRCS ${ARCH_TOOLCHAIN_DIR}/arch_memset.S) +endif() + +if(CONFIG_ARMV7R_MEMMOVE) + list(APPEND SRCS ${ARCH_TOOLCHAIN_DIR}/arch_memmove.S) +endif() + +if(CONFIG_ARMV7R_STRCMP) + list(APPEND SRCS ${ARCH_TOOLCHAIN_DIR}/arch_strcmp.S) +endif() + +if(CONFIG_ARMV7R_STRLEN) + list(APPEND SRCS ${ARCH_TOOLCHAIN_DIR}/arch_strlen.S) endif() if(CONFIG_LIBC_ARCH_ELF) - target_sources(c PRIVATE arch_elf.c) + list(APPEND SRCS arch_elf.c) endif() + +target_sources(c PRIVATE ${SRCS}) diff --git a/libs/libc/machine/arm/armv8-m/CMakeLists.txt b/libs/libc/machine/arm/armv8-m/CMakeLists.txt index 71cc3a774d..809f82fe6e 100644 --- a/libs/libc/machine/arm/armv8-m/CMakeLists.txt +++ b/libs/libc/machine/arm/armv8-m/CMakeLists.txt @@ -20,36 +20,40 @@ set(SRCS) +if(CONFIG_ARCH_TOOLCHAIN_GNU) + set(ARCH_TOOLCHAIN_DIR gnu) +endif() + if(CONFIG_LIBC_ARCH_ELF) list(APPEND SRCS arch_elf.c) endif() if(CONFIG_ARMV8M_MEMCHR) - list(APPEND SRCS arch_memchr.S) + list(APPEND SRCS ${ARCH_TOOLCHAIN_DIR}/arch_memchr.S) endif() if(CONFIG_ARMV8M_MEMCPY) - list(APPEND SRCS arch_memcpy.S) + list(APPEND SRCS ${ARCH_TOOLCHAIN_DIR}/arch_memcpy.S) endif() if(CONFIG_ARMV8M_MEMSET) - list(APPEND SRCS arch_memset.S) + list(APPEND SRCS ${ARCH_TOOLCHAIN_DIR}/arch_memset.S) endif() if(CONFIG_ARMV8M_MEMMOVE) - list(APPEND SRCS arch_memmove.S) + list(APPEND SRCS ${ARCH_TOOLCHAIN_DIR}/arch_memmove.S) endif() if(CONFIG_ARMV8M_STRCMP) - list(APPEND SRCS arch_strcmp.S) + list(APPEND SRCS ${ARCH_TOOLCHAIN_DIR}/arch_strcmp.S) endif() if(CONFIG_ARMV8M_STRCPY) - list(APPEND SRCS arch_strcpy.S) + list(APPEND SRCS ${ARCH_TOOLCHAIN_DIR}/arch_strcpy.S) endif() if(CONFIG_ARMV8M_STRLEN) - list(APPEND SRCS arch_strlen.S) + list(APPEND SRCS ${ARCH_TOOLCHAIN_DIR}/arch_strlen.S) endif() target_sources(c PRIVATE ${SRCS})