From 563125fde3483b6dac97ee4a3ea4e93102f25b2d Mon Sep 17 00:00:00 2001 From: chao an Date: Fri, 25 Aug 2023 12:45:39 +0800 Subject: [PATCH] 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 --- arch/arm/src/cmake/Toolchain.cmake | 6 +++--- arch/arm/src/common/Toolchain.defs | 8 ++++---- arch/arm64/src/Toolchain.defs | 4 ++-- arch/avr/src/avr/Toolchain.defs | 2 +- arch/avr/src/avr32/Toolchain.defs | 2 +- arch/mips/src/mips32/Toolchain.defs | 2 +- arch/misoc/src/lm32/Toolchain.defs | 2 +- arch/misoc/src/minerva/Toolchain.defs | 2 +- arch/or1k/src/mor1kx/Toolchain.defs | 2 +- arch/risc-v/src/common/Toolchain.defs | 4 ++-- arch/sparc/src/sparc_v8/Toolchain.defs | 2 +- arch/xtensa/src/lx6/Toolchain.defs | 2 +- arch/xtensa/src/lx7/Toolchain.defs | 2 +- boards/renesas/m16c/skp16c26/scripts/Make.defs | 2 +- boards/renesas/rx65n/rx65n-grrose/scripts/Make.defs | 2 +- boards/renesas/rx65n/rx65n-rsk1mb/scripts/Make.defs | 2 +- boards/renesas/rx65n/rx65n-rsk2mb/scripts/Make.defs | 2 +- boards/renesas/rx65n/rx65n/scripts/Make.defs | 2 +- boards/renesas/sh1/us7032evb1/scripts/Make.defs | 2 +- boards/risc-v/mpfs/icicle/scripts/ld-envm-opensbi.script | 8 ++++---- boards/sim/sim/sim/scripts/Make.defs | 2 +- boards/x86/qemu/qemu-i486/scripts/Make.defs | 2 +- boards/x86_64/intel64/qemu-intel64/scripts/Make.defs | 2 +- 23 files changed, 33 insertions(+), 33 deletions(-) diff --git a/arch/arm/src/cmake/Toolchain.cmake b/arch/arm/src/cmake/Toolchain.cmake index 3d3de23681..a68bb56b87 100644 --- a/arch/arm/src/cmake/Toolchain.cmake +++ b/arch/arm/src/cmake/Toolchain.cmake @@ -89,9 +89,9 @@ endif() # override the ARCHIVE command -set(CMAKE_C_ARCHIVE_CREATE " rcs ") -set(CMAKE_CXX_ARCHIVE_CREATE " rcs ") -set(CMAKE_ASM_ARCHIVE_CREATE " rcs ") +set(CMAKE_C_ARCHIVE_CREATE " rcsP ") +set(CMAKE_CXX_ARCHIVE_CREATE " rcsP ") +set(CMAKE_ASM_ARCHIVE_CREATE " rcsP ") # Architecture flags diff --git a/arch/arm/src/common/Toolchain.defs b/arch/arm/src/common/Toolchain.defs index b8da108f1a..587f420b8a 100644 --- a/arch/arm/src/common/Toolchain.defs +++ b/arch/arm/src/common/Toolchain.defs @@ -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 diff --git a/arch/arm64/src/Toolchain.defs b/arch/arm64/src/Toolchain.defs index c8ab501e55..7a154c9b54 100644 --- a/arch/arm64/src/Toolchain.defs +++ b/arch/arm64/src/Toolchain.defs @@ -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 diff --git a/arch/avr/src/avr/Toolchain.defs b/arch/avr/src/avr/Toolchain.defs index ea98f72bcb..b183f89c9a 100644 --- a/arch/avr/src/avr/Toolchain.defs +++ b/arch/avr/src/avr/Toolchain.defs @@ -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 diff --git a/arch/avr/src/avr32/Toolchain.defs b/arch/avr/src/avr32/Toolchain.defs index 8c9d19510c..ad772b8826 100644 --- a/arch/avr/src/avr32/Toolchain.defs +++ b/arch/avr/src/avr32/Toolchain.defs @@ -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 diff --git a/arch/mips/src/mips32/Toolchain.defs b/arch/mips/src/mips32/Toolchain.defs index 9f852c354a..fa5b6b4d51 100644 --- a/arch/mips/src/mips32/Toolchain.defs +++ b/arch/mips/src/mips32/Toolchain.defs @@ -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 diff --git a/arch/misoc/src/lm32/Toolchain.defs b/arch/misoc/src/lm32/Toolchain.defs index bde979f005..78025085c8 100644 --- a/arch/misoc/src/lm32/Toolchain.defs +++ b/arch/misoc/src/lm32/Toolchain.defs @@ -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 diff --git a/arch/misoc/src/minerva/Toolchain.defs b/arch/misoc/src/minerva/Toolchain.defs index 2848a97968..22c889b533 100644 --- a/arch/misoc/src/minerva/Toolchain.defs +++ b/arch/misoc/src/minerva/Toolchain.defs @@ -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 diff --git a/arch/or1k/src/mor1kx/Toolchain.defs b/arch/or1k/src/mor1kx/Toolchain.defs index e048f11583..314d550f7e 100644 --- a/arch/or1k/src/mor1kx/Toolchain.defs +++ b/arch/or1k/src/mor1kx/Toolchain.defs @@ -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 diff --git a/arch/risc-v/src/common/Toolchain.defs b/arch/risc-v/src/common/Toolchain.defs index 9032d5a89d..cda28063af 100644 --- a/arch/risc-v/src/common/Toolchain.defs +++ b/arch/risc-v/src/common/Toolchain.defs @@ -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 diff --git a/arch/sparc/src/sparc_v8/Toolchain.defs b/arch/sparc/src/sparc_v8/Toolchain.defs index b6c199e8d0..76799694f5 100644 --- a/arch/sparc/src/sparc_v8/Toolchain.defs +++ b/arch/sparc/src/sparc_v8/Toolchain.defs @@ -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 diff --git a/arch/xtensa/src/lx6/Toolchain.defs b/arch/xtensa/src/lx6/Toolchain.defs index 7e18245d01..bc8fa1b240 100644 --- a/arch/xtensa/src/lx6/Toolchain.defs +++ b/arch/xtensa/src/lx6/Toolchain.defs @@ -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 diff --git a/arch/xtensa/src/lx7/Toolchain.defs b/arch/xtensa/src/lx7/Toolchain.defs index cc93a0c1bf..8f7101f7f4 100644 --- a/arch/xtensa/src/lx7/Toolchain.defs +++ b/arch/xtensa/src/lx7/Toolchain.defs @@ -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 diff --git a/boards/renesas/m16c/skp16c26/scripts/Make.defs b/boards/renesas/m16c/skp16c26/scripts/Make.defs index d20c9f3087..c7988123b6 100644 --- a/boards/renesas/m16c/skp16c26/scripts/Make.defs +++ b/boards/renesas/m16c/skp16c26/scripts/Make.defs @@ -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 diff --git a/boards/renesas/rx65n/rx65n-grrose/scripts/Make.defs b/boards/renesas/rx65n/rx65n-grrose/scripts/Make.defs index 98e54d69ef..7a0acf7101 100644 --- a/boards/renesas/rx65n/rx65n-grrose/scripts/Make.defs +++ b/boards/renesas/rx65n/rx65n-grrose/scripts/Make.defs @@ -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 diff --git a/boards/renesas/rx65n/rx65n-rsk1mb/scripts/Make.defs b/boards/renesas/rx65n/rx65n-rsk1mb/scripts/Make.defs index 3d7b889571..d25013cf71 100644 --- a/boards/renesas/rx65n/rx65n-rsk1mb/scripts/Make.defs +++ b/boards/renesas/rx65n/rx65n-rsk1mb/scripts/Make.defs @@ -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 diff --git a/boards/renesas/rx65n/rx65n-rsk2mb/scripts/Make.defs b/boards/renesas/rx65n/rx65n-rsk2mb/scripts/Make.defs index f55a3606f0..a407fdedef 100644 --- a/boards/renesas/rx65n/rx65n-rsk2mb/scripts/Make.defs +++ b/boards/renesas/rx65n/rx65n-rsk2mb/scripts/Make.defs @@ -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 diff --git a/boards/renesas/rx65n/rx65n/scripts/Make.defs b/boards/renesas/rx65n/rx65n/scripts/Make.defs index dd8502d6d4..9647404cb5 100644 --- a/boards/renesas/rx65n/rx65n/scripts/Make.defs +++ b/boards/renesas/rx65n/rx65n/scripts/Make.defs @@ -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 diff --git a/boards/renesas/sh1/us7032evb1/scripts/Make.defs b/boards/renesas/sh1/us7032evb1/scripts/Make.defs index be01eab4c2..5a0114cf90 100644 --- a/boards/renesas/sh1/us7032evb1/scripts/Make.defs +++ b/boards/renesas/sh1/us7032evb1/scripts/Make.defs @@ -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 diff --git a/boards/risc-v/mpfs/icicle/scripts/ld-envm-opensbi.script b/boards/risc-v/mpfs/icicle/scripts/ld-envm-opensbi.script index 7843d3f82a..bc23abdb61 100644 --- a/boards/risc-v/mpfs/icicle/scripts/ld-envm-opensbi.script +++ b/boards/risc-v/mpfs/icicle/scripts/ld-envm-opensbi.script @@ -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) diff --git a/boards/sim/sim/sim/scripts/Make.defs b/boards/sim/sim/sim/scripts/Make.defs index 7ade925e10..1ce4572cb0 100644 --- a/boards/sim/sim/sim/scripts/Make.defs +++ b/boards/sim/sim/sim/scripts/Make.defs @@ -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 diff --git a/boards/x86/qemu/qemu-i486/scripts/Make.defs b/boards/x86/qemu/qemu-i486/scripts/Make.defs index a8b5c7cdef..e361392a78 100644 --- a/boards/x86/qemu/qemu-i486/scripts/Make.defs +++ b/boards/x86/qemu/qemu-i486/scripts/Make.defs @@ -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 diff --git a/boards/x86_64/intel64/qemu-intel64/scripts/Make.defs b/boards/x86_64/intel64/qemu-intel64/scripts/Make.defs index f9a264dfbb..9dceb97084 100644 --- a/boards/x86_64/intel64/qemu-intel64/scripts/Make.defs +++ b/boards/x86_64/intel64/qemu-intel64/scripts/Make.defs @@ -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