libc/machine/arm64: Move all source files out of gnu folder

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2025-06-22 14:13:58 +08:00
committed by Donny(董九柱)
parent 378f8a5c0f
commit c1a37ec1fb
18 changed files with 76 additions and 107 deletions
+60 -1
View File
@@ -19,7 +19,6 @@
# the License.
#
# ##############################################################################
add_subdirectory(gnu)
set(SRCS)
@@ -27,4 +26,64 @@ if(CONFIG_LIBC_ARCH_ELF_64BIT)
list(APPEND SRCS arch_elf.c)
endif()
if(CONFIG_ARM64_MEMCHR)
list(APPEND SRCS arch_memchr.S)
endif()
if(CONFIG_ARM64_MEMCMP)
list(APPEND SRCS arch_memcmp.S)
endif()
if(CONFIG_ARM64_MEMCPY)
list(APPEND SRCS arch_memcpy.S)
endif()
if(CONFIG_ARM64_MEMMOVE)
list(APPEND SRCS arch_memmove.S)
endif()
if(CONFIG_ARM64_MEMSET)
list(APPEND SRCS arch_memset.S)
endif()
if(CONFIG_ARM64_STRCHR)
list(APPEND SRCS arch_strchr.S)
endif()
if(CONFIG_ARM64_STRCHRNUL)
list(APPEND SRCS arch_strchrnul.S)
endif()
if(CONFIG_ARM64_STRCMP)
list(APPEND SRCS arch_strcmp.S)
endif()
if(CONFIG_ARM64_STRCPY)
list(APPEND SRCS arch_strcpy.S)
endif()
if(CONFIG_ARM64_STRLEN)
list(APPEND SRCS arch_strlen.S)
endif()
if(CONFIG_ARM64_STRNCMP)
list(APPEND SRCS arch_strncmp.S)
endif()
if(CONFIG_ARM64_STRNLEN)
list(APPEND SRCS arch_strnlen.S)
endif()
if(CONFIG_ARM64_STRRCHR)
list(APPEND SRCS arch_strrchr.S)
endif()
if(CONFIG_ARCH_SETJMP_H)
list(APPEND SRCS arch_setjmp.S)
endif()
if(NOT CONFIG_PROFILE_NONE)
list(APPEND SRCS arch_mcount.c)
endif()
target_sources(c PRIVATE ${SRCS})
+1 -6
View File
@@ -81,12 +81,7 @@ ASRCS += arch_setjmp.S
endif
ifeq ($(CONFIG_PROFILE_NONE),)
CSRCS += mcount.c
endif
ifeq ($(CONFIG_ARCH_TOOLCHAIN_GNU),y)
DEPPATH += --dep-path machine/arm64/gnu
VPATH += :machine/arm64/gnu
CSRCS += arch_mcount.c
endif
DEPPATH += --dep-path machine/arm64
@@ -1,5 +1,5 @@
/****************************************************************************
* libs/libc/machine/arm64/gnu/mcount.c
* libs/libc/machine/arm64/arch_mcount.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -1,5 +1,5 @@
/****************************************************************************
* libs/libc/machine/arm64/gnu/arch_memchr.S
* libs/libc/machine/arm64/arch_memchr.S
*
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-FileCopyrightText: 2014, ARM Limited, All rights Reserved.
@@ -1,5 +1,5 @@
/****************************************************************************
* libs/libc/machine/arm64/gnu/arch_memcmp.S
* libs/libc/machine/arm64/arch_memcmp.S
*
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-FileCopyrightText: 2018 Linaro Limited, 2017 ARM Ltd
@@ -1,5 +1,5 @@
/****************************************************************************
* libs/libc/machine/arm64/gnu/arch_memcpy.S
* libs/libc/machine/arm64/arch_memcpy.S
*
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-FileCopyrightText: 2012-2013, Linaro Limited, 2015 ARM Ltd
@@ -1,5 +1,5 @@
/****************************************************************************
* libs/libc/machine/arm64/gnu/arch_memmove.S
* libs/libc/machine/arm64/arch_memmove.S
*
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-FileCopyrightText: 2013, Linaro Limited, 2015 ARM Ltd
@@ -1,5 +1,5 @@
/****************************************************************************
* libs/libc/machine/arm64/gnu/arch_memset.S
* libs/libc/machine/arm64/arch_memset.S
*
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-FileCopyrightText: 2012-2013, Linaro Limited, 2015 ARM Ltd
@@ -1,5 +1,5 @@
/****************************************************************************
* libs/libc/machine/arm64/gnu/arch_setjmp.S
* libs/libc/machine/arm64/arch_setjmp.S
*
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-FileCopyrightText: 2011, 2012 ARM Ltd, All rights reserved.
@@ -1,5 +1,5 @@
/****************************************************************************
* libs/libc/machine/arm64/gnu/arch_strchr.S
* libs/libc/machine/arm64/arch_strchr.S
*
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-FileCopyrightText: 2014, ARM Limited, All rights Reserved.
@@ -1,5 +1,5 @@
/****************************************************************************
* libs/libc/machine/arm64/gnu/arch_strchrnul.S
* libs/libc/machine/arm64/arch_strchrnul.S
*
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-FileCopyrightText: 2014, ARM Limited, All rights Reserved.
@@ -1,5 +1,5 @@
/****************************************************************************
* libs/libc/machine/arm64/gnu/arch_strcmp.S
* libs/libc/machine/arm64/arch_strcmp.S
*
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-FileCopyrightText: 2012-2018, Linaro Limited, All rights reserved.
@@ -1,5 +1,5 @@
/****************************************************************************
* libs/libc/machine/arm64/gnu/arch_strcpy.S
* libs/libc/machine/arm64/arch_strcpy.S
*
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-FileCopyrightText: 2013, 2014, 2015 ARM Ltd., All rights Reserved.
@@ -1,5 +1,5 @@
/****************************************************************************
* libs/libc/machine/arm64/gnu/arch_strlen.S
* libs/libc/machine/arm64/arch_strlen.S
*
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-FileCopyrightText: 2013-2015, Linaro Limited, All rights reserved.
@@ -1,5 +1,5 @@
/****************************************************************************
* libs/libc/machine/arm64/gnu/arch_strncmp.S
* libs/libc/machine/arm64/arch_strncmp.S
*
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-FileCopyrightText: 2013, 2018, Linaro Limited, All rights reserved.
@@ -1,5 +1,5 @@
/****************************************************************************
* libs/libc/machine/arm64/gnu/arch_strnlen.S
* libs/libc/machine/arm64/arch_strnlen.S
*
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-FileCopyrightText: 2013, Linaro Limited, All rights reserved.
@@ -1,5 +1,5 @@
/****************************************************************************
* libs/libc/machine/arm64/gnu/arch_strrchr.S
* libs/libc/machine/arm64/arch_strrchr.S
*
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-FileCopyrightText: 2014, ARM Limited, All rights Reserved.
@@ -1,85 +0,0 @@
# ##############################################################################
# libs/libc/machine/arm64/gnu/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
#
# ##############################################################################
set(SRCS)
if(CONFIG_ARM64_MEMCHR)
list(APPEND SRCS arch_memchr.S)
endif()
if(CONFIG_ARM64_MEMCMP)
list(APPEND SRCS arch_memcmp.S)
endif()
if(CONFIG_ARM64_MEMCPY)
list(APPEND SRCS arch_memcpy.S)
endif()
if(CONFIG_ARM64_MEMMOVE)
list(APPEND SRCS arch_memmove.S)
endif()
if(CONFIG_ARM64_MEMSET)
list(APPEND SRCS arch_memset.S)
endif()
if(CONFIG_ARM64_STRCHR)
list(APPEND SRCS arch_strchr.S)
endif()
if(CONFIG_ARM64_STRCHRNUL)
list(APPEND SRCS arch_strchrnul.S)
endif()
if(CONFIG_ARM64_STRCMP)
list(APPEND SRCS arch_strcmp.S)
endif()
if(CONFIG_ARM64_STRCPY)
list(APPEND SRCS arch_strcpy.S)
endif()
if(CONFIG_ARM64_STRLEN)
list(APPEND SRCS arch_strlen.S)
endif()
if(CONFIG_ARM64_STRNCMP)
list(APPEND SRCS arch_strncmp.S)
endif()
if(CONFIG_ARM64_STRNLEN)
list(APPEND SRCS arch_strnlen.S)
endif()
if(CONFIG_ARM64_STRRCHR)
list(APPEND SRCS arch_strrchr.S)
endif()
if(CONFIG_ARCH_SETJMP_H)
list(APPEND SRCS arch_setjmp.S)
endif()
if(NOT CONFIG_PROFILE_NONE)
list(APPEND SRCS mcount.c)
endif()
target_sources(c PRIVATE ${SRCS})