This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit d2ee0fd27bb18901ed78c58910d97ff015eb18a4 Author: zhangyu117 <[email protected]> AuthorDate: Thu Oct 29 22:38:09 2026 +0800 libc/tricore: drop the forced -mtc18 assembler flag The make build forced -Wa,-mtc18 for the libc assembly files, so on TC1.6.2 cores (tc3xx) these objects were marked as TC_V1.8 and the link failed with an incompatible core architecture error. Let the assembly follow the core flags set by the chip Toolchain.defs, as the cmake build already does. [skip-cmake-parity] The flag only existed in Make.defs; CMake never passed -Wa,-mtc18, so there is nothing to mirror on the CMake side. Signed-off-by: zhangyu117 <[email protected]> --- libs/libc/machine/tricore/Make.defs | 6 ------ libs/libc/machine/tricore/gnu/arch_memcpy.S | 3 +-- libs/libc/machine/tricore/gnu/arch_memset.S | 3 +-- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/libs/libc/machine/tricore/Make.defs b/libs/libc/machine/tricore/Make.defs index 295a47d5dc2..a1f8a7eba0d 100644 --- a/libs/libc/machine/tricore/Make.defs +++ b/libs/libc/machine/tricore/Make.defs @@ -32,12 +32,6 @@ endif AFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)libs$(DELIM)libc$(DELIM)machine$(DELIM)tricore -# The optimized assembly routines use TC1.8 instructions (e.g. ld.dd/st.dd -# quad-word access). Force the assembler to target TC1.8 so the build does -# not depend on the board's ambient platform flags. - -AFLAGS += -Wa,-mtc18 - ifeq ($(CONFIG_ARCH_SETJMP_H),y) ASRCS += arch_setjmp.$(ASMEXT) endif diff --git a/libs/libc/machine/tricore/gnu/arch_memcpy.S b/libs/libc/machine/tricore/gnu/arch_memcpy.S index b5ca86041e2..ba49e14a68b 100644 --- a/libs/libc/machine/tricore/gnu/arch_memcpy.S +++ b/libs/libc/machine/tricore/gnu/arch_memcpy.S @@ -48,8 +48,7 @@ * same minimum the vendor Tasking memcpy relies on), so no data alignment * trap can occur. * - * Requires the assembler to target TC1.8 for ld.dd/st.dd (see AFLAGS - * -Wa,-mtc18 in Make.defs / CMakeLists.txt). + * Requires the assembler to target TC1.8 for ld.dd/st.dd. * * Q0 is a lower-context register pair group; together with the other scratch * registers (%d15, %a2/%a3/%a15) it needs no CSA context save. diff --git a/libs/libc/machine/tricore/gnu/arch_memset.S b/libs/libc/machine/tricore/gnu/arch_memset.S index 8cb5a125a1e..aa49224ab8e 100644 --- a/libs/libc/machine/tricore/gnu/arch_memset.S +++ b/libs/libc/machine/tricore/gnu/arch_memset.S @@ -50,8 +50,7 @@ * read-modify-write, corrupting shared memory. Aligning to 8 makes every * quad store write two whole 64-bit ECC words. * - * Requires the assembler to target TC1.8 for st.dd (see AFLAGS -Wa,-mtc18 in - * Make.defs / CMakeLists.txt). + * Requires the assembler to target TC1.8 for st.dd. * * Q0 is a lower-context register pair group; together with the other scratch * registers (%d15, %a2/%a3/%a15) it needs no CSA context save.
