make/archive: Use the full path name when matching or storing names in the archive

This pr will avoid targets with the same name can not be archive in the same library

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an 2023-08-25 12:45:39 +08:00 committed by Xiang Xiao
parent 6d44c42707
commit 563125fde3
23 changed files with 33 additions and 33 deletions

View File

@ -89,9 +89,9 @@ endif()
# override the ARCHIVE command
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> rcs <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> rcs <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_ASM_ARCHIVE_CREATE "<CMAKE_AR> rcs <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> rcsP <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> rcsP <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_ASM_ARCHIVE_CREATE "<CMAKE_AR> rcsP <TARGET> <LINK_FLAGS> <OBJECTS>")
# Architecture flags

View File

@ -157,7 +157,7 @@ ifeq ($(CONFIG_ARM_TOOLCHAIN_CLANG),y)
CPP = clang -E -P -x c
LD = ld.lld -m armelf
STRIP = llvm-strip --strip-unneeded
AR = llvm-ar rcs
AR = llvm-ar rcsP
NM = llvm-nm
OBJCOPY = llvm-objcopy
OBJDUMP = llvm-objdump
@ -189,7 +189,7 @@ else ifeq ($(CONFIG_ARM_TOOLCHAIN_ARMCLANG),y)
CPP = armclang -E -P -x c
LD = armlink
STRIP = llvm-strip --strip-unneeded
AR = armar -rcs
AR = armar -rcsP
NM = llvm-nm
OBJCOPY = llvm-objcopy
OBJDUMP = llvm-objdump
@ -230,7 +230,7 @@ else
CPP = $(CROSSDEV)gcc -E -P -x c
LD = $(CROSSDEV)ld
STRIP = $(CROSSDEV)strip --strip-unneeded
AR = $(CROSSDEV)ar rcs
AR = $(CROSSDEV)ar rcsP
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump
@ -238,7 +238,7 @@ else
ifeq ($(CONFIG_LTO_FULL),y)
ifeq ($(CONFIG_ARM_TOOLCHAIN_GNU_EABI),y)
LD := $(CROSSDEV)gcc
AR := $(CROSSDEV)gcc-ar rcs
AR := $(CROSSDEV)gcc-ar rcsP
NM := $(CROSSDEV)gcc-nm
ARCHOPTIMIZATION += -fno-builtin
endif

View File

@ -146,7 +146,7 @@ STRIP = $(CROSSDEV)strip --strip-unneeded
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump
LD = $(CROSSDEV)ld
AR = $(CROSSDEV)ar rcs
AR = $(CROSSDEV)ar rcsP
NM = $(CROSSDEV)nm
# Link Time Optimization
@ -155,7 +155,7 @@ ifeq ($(CONFIG_LTO_FULL),y)
ARCHOPTIMIZATION += -flto
ifeq ($(CONFIG_ARM_TOOLCHAIN_GNU_EABI),y)
LD := $(CROSSDEV)gcc
AR := $(CROSSDEV)gcc-ar rcs
AR := $(CROSSDEV)gcc-ar rcsP
NM := $(CROSSDEV)gcc-nm
ARCHOPTIMIZATION += -fuse-linker-plugin
ARCHOPTIMIZATION += -fno-builtin

View File

@ -147,7 +147,7 @@ CXX = $(CROSSDEV)g++
CPP = $(CROSSDEV)gcc -E -P -x c
LD = $(CROSSDEV)ld
STRIP = $(CROSSDEV)strip --strip-unneeded
AR = $(CROSSDEV)ar rcs
AR = $(CROSSDEV)ar rcsP
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump

View File

@ -77,7 +77,7 @@ CXX = $(CROSSDEV)g++
CPP = $(CROSSDEV)gcc -E -P -x c
LD = $(CROSSDEV)ld
STRIP = $(CROSSDEV)strip --strip-unneeded
AR = $(CROSSDEV)ar rcs
AR = $(CROSSDEV)ar rcsP
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump

View File

@ -286,7 +286,7 @@ CXX = $(CROSSDEV)g++
CPP = $(CROSSDEV)gcc -E -P -x c
LD = $(CROSSDEV)ld
STRIP = $(CROSSDEV)strip --strip-unneeded
AR = $(CROSSDEV)ar rcs
AR = $(CROSSDEV)ar rcsP
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump

View File

@ -108,7 +108,7 @@ CXX = $(CROSSDEV)g++
CPP = $(CROSSDEV)gcc -E -P -x c
LD = $(CROSSDEV)ld
STRIP = $(CROSSDEV)strip --strip-unneeded
AR = $(CROSSDEV)ar rcs
AR = $(CROSSDEV)ar rcsP
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump

View File

@ -56,7 +56,7 @@ CXX = $(CROSSDEV)g++
CPP = $(CROSSDEV)gcc -E -P -x c
LD = $(CROSSDEV)ld
STRIP = $(CROSSDEV)strip --strip-unneeded
AR = $(CROSSDEV)ar rcs
AR = $(CROSSDEV)ar rcsP
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump

View File

@ -94,7 +94,7 @@ CXX = $(CROSSDEV)g++
CPP = $(CROSSDEV)gcc -E -P -x c
LD = $(CROSSDEV)ld
STRIP = $(CROSSDEV)strip --strip-unneeded
AR = $(CROSSDEV)ar rcs
AR = $(CROSSDEV)ar rcsP
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump

View File

@ -245,7 +245,7 @@ STRIP = $(CROSSDEV)strip --strip-unneeded
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump
LD = $(CROSSDEV)ld
AR = $(CROSSDEV)ar rcs
AR = $(CROSSDEV)ar rcsP
NM = $(CROSSDEV)nm
# Link Time Optimization
@ -254,7 +254,7 @@ ifeq ($(CONFIG_LTO_FULL),y)
ARCHOPTIMIZATION += -flto
ifeq ($(CONFIG_RISCV_TOOLCHAIN),GNU_RVG)
LD := $(CROSSDEV)gcc
AR := $(CROSSDEV)gcc-ar rcs
AR := $(CROSSDEV)gcc-ar rcsP
NM := $(CROSSDEV)gcc-nm
ARCHOPTIMIZATION += -fuse-linker-plugin
ARCHOPTIMIZATION += -fno-builtin

View File

@ -115,7 +115,7 @@ CXX = $(CROSSDEV)g++
CPP = $(CROSSDEV)gcc -E
LD = $(CROSSDEV)ld
STRIP = $(CROSSDEV)strip --strip-unneeded
AR = $(CROSSDEV)ar rcs
AR = $(CROSSDEV)ar rcsP
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump

View File

@ -152,7 +152,7 @@ endif
LD = $(CROSSDEV)ld
STRIP = $(CROSSDEV)strip --strip-unneeded
AR = $(CROSSDEV)ar rcs
AR = $(CROSSDEV)ar rcsP
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump

View File

@ -156,7 +156,7 @@ endif
LD = $(CROSSDEV)ld
STRIP = $(CROSSDEV)strip --strip-unneeded
AR = $(CROSSDEV)ar rcs
AR = $(CROSSDEV)ar rcsP
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump

View File

@ -25,7 +25,7 @@ CROSSDEV = m32c-nuttx-elf-
CC = $(CROSSDEV)gcc
CPP = $(CROSSDEV)gcc -E
LD = $(CROSSDEV)ld
AR = $(CROSSDEV)ar rcs
AR = $(CROSSDEV)ar rcsP
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump

View File

@ -29,7 +29,7 @@ CXX = $(CROSSDEV)g++
CPP = $(CROSSDEV)gcc -E -P -x c
LD = $(CROSSDEV)ld
STRIP = $(CROSSDEV)strip --strip-unneeded
AR = $(CROSSDEV)ar rcs
AR = $(CROSSDEV)ar rcsP
AS = $(CROSSDEV)as
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy

View File

@ -29,7 +29,7 @@ CXX = $(CROSSDEV)g++
CPP = $(CROSSDEV)gcc -E -P -x c
LD = $(CROSSDEV)ld
STRIP = $(CROSSDEV)strip --strip-unneeded
AR = $(CROSSDEV)ar rcs
AR = $(CROSSDEV)ar rcsP
AS = $(CROSSDEV)as
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy

View File

@ -29,7 +29,7 @@ CXX = $(CROSSDEV)g++
CPP = $(CROSSDEV)gcc -E -P -x c
LD = $(CROSSDEV)ld
STRIP = $(CROSSDEV)strip --strip-unneeded
AR = $(CROSSDEV)ar rcs
AR = $(CROSSDEV)ar rcsP
AS = $(CROSSDEV)as
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy

View File

@ -29,7 +29,7 @@ CXX = $(CROSSDEV)g++
CPP = $(CROSSDEV)gcc -E -P -x c
LD = $(CROSSDEV)ld
STRIP = $(CROSSDEV)strip --strip-unneeded
AR = $(CROSSDEV)ar rcs
AR = $(CROSSDEV)ar rcsP
AS = $(CROSSDEV)as
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy

View File

@ -39,7 +39,7 @@ CC = $(CROSSDEV)gcc
CPP = $(CROSSDEV)gcc -E
LD = $(CROSSDEV)ld
STRIP = $(CROSSDEV)strip --strip-unneeded
AR = $(CROSSDEV)ar rcs
AR = $(CROSSDEV)ar rcsP
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump

View File

@ -33,10 +33,10 @@ EXTERN(__start)
SECTIONS
{
.text.sbi : {
sbi*
riscv_atomic*
riscv_locks*
riscv_asm*
*/sbi*
*/riscv_atomic*
*/riscv_locks*
*/riscv_asm*
} > ddr
.l2_scratchpad : ALIGN(0x10)

View File

@ -166,7 +166,7 @@ STRIP = $(CROSSDEV)strip
AR = $(TOPDIR)/tools/macar-rcs.sh
else
STRIP = $(CROSSDEV)strip --strip-unneeded
AR = $(CROSSDEV)ar rcs
AR = $(CROSSDEV)ar rcsP
endif
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy

View File

@ -53,7 +53,7 @@ CC = $(CROSSDEV)gcc
CPP = $(CROSSDEV)gcc -E
LD = $(CROSSDEV)ld
STRIP = $(CROSSDEV)strip --strip-unneeded
AR = $(CROSSDEV)ar rcs
AR = $(CROSSDEV)ar rcsP
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump

View File

@ -51,7 +51,7 @@ CC = $(CROSSDEV)gcc
CPP = $(CROSSDEV)gcc -E
LD = $(CROSSDEV)ld
STRIP = $(CROSSDEV)strip --strip-unneeded
AR = $(CROSSDEV)ar rcs
AR = $(CROSSDEV)ar rcsP
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump