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 60271b3039d14592015f30a40401aab5da528141
Author: wangmingrong1 <[email protected]>
AuthorDate: Mon Nov 2 18:42:50 2026 +0800

    build(compiler-rt): add LLVM 21 new builtins to exclusion lists
    
    LLVM 21 adds 6 new builtins source files. Three of them use bfloat16
    types and three use x86 80-bit extended precision (xf_float), requiring
    exclusion on unsupported platforms.
    
    New bfloat16 exclusions (when CONFIG_LIB_COMPILER_RT_HAS_BFLOAT16=n):
      - trunctfbf2.c (quad -> bfloat16)
      - truncxfbf2.c (long double -> bfloat16)
      - extendbfsf2.c (bfloat16 -> float)
    
    New x86_80_BIT exclusions (on non-x86_64 architectures):
      - extendhfxf2.c (half -> x86 long double)
      - truncxfhf2.c (x86 long double -> half)
      - truncxfbf2.c (x86 long double -> bfloat16)
    
    Note: truncxfbf2.c appears in both lists as it depends on both bfloat16
    and x86 80-bit types. filter-out/REMOVE_ITEM is idempotent.
    
    Signed-off-by: wangmingrong1 <[email protected]>
---
 libs/libbuiltin/compiler-rt/CMakeLists.txt | 11 ++++++++---
 libs/libbuiltin/compiler-rt/Make.defs      |  4 ++++
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/libs/libbuiltin/compiler-rt/CMakeLists.txt 
b/libs/libbuiltin/compiler-rt/CMakeLists.txt
index c0d7b740077..a3aa7c731ff 100644
--- a/libs/libbuiltin/compiler-rt/CMakeLists.txt
+++ b/libs/libbuiltin/compiler-rt/CMakeLists.txt
@@ -94,8 +94,10 @@ if(CONFIG_BUILTIN_COMPILER_RT)
   list(APPEND RT_BUILTINS_SRCS ${SRCSTMP})
 
   if(NOT CONFIG_LIB_COMPILER_RT_HAS_BFLOAT16)
-    set(RT_BUILTINS_BFLOAT16_SRCS ${BUILTINS_DIR}/truncdfbf2.c
-                                  ${BUILTINS_DIR}/truncsfbf2.c)
+    set(RT_BUILTINS_BFLOAT16_SRCS
+        ${BUILTINS_DIR}/truncdfbf2.c ${BUILTINS_DIR}/truncsfbf2.c
+        ${BUILTINS_DIR}/trunctfbf2.c ${BUILTINS_DIR}/truncxfbf2.c
+        ${BUILTINS_DIR}/extendbfsf2.c)
     list(REMOVE_ITEM RT_BUILTINS_SRCS ${RT_BUILTINS_BFLOAT16_SRCS})
   endif()
 
@@ -113,7 +115,10 @@ if(CONFIG_BUILTIN_COMPILER_RT)
       ${BUILTINS_DIR}/floatuntixf.c
       ${BUILTINS_DIR}/mulxc3.c
       ${BUILTINS_DIR}/powixf2.c
-      ${BUILTINS_DIR}/trunctfxf2.c)
+      ${BUILTINS_DIR}/trunctfxf2.c
+      ${BUILTINS_DIR}/extendhfxf2.c
+      ${BUILTINS_DIR}/truncxfhf2.c
+      ${BUILTINS_DIR}/truncxfbf2.c)
 
   if(NOT CONFIG_ARCH_X86_64)
     list(REMOVE_ITEM RT_BUILTINS_SRCS ${x86_80_BIT_SOURCES})
diff --git a/libs/libbuiltin/compiler-rt/Make.defs 
b/libs/libbuiltin/compiler-rt/Make.defs
index 627d04471dd..6d2fdabc5e1 100644
--- a/libs/libbuiltin/compiler-rt/Make.defs
+++ b/libs/libbuiltin/compiler-rt/Make.defs
@@ -100,6 +100,9 @@ endif
 ifeq ($(CONFIG_LIB_COMPILER_RT_HAS_BFLOAT16),)
   BFLOAT16_SRCS := compiler-rt/compiler-rt/lib/builtins/truncdfbf2.c
   BFLOAT16_SRCS += compiler-rt/compiler-rt/lib/builtins/truncsfbf2.c
+  BFLOAT16_SRCS += compiler-rt/compiler-rt/lib/builtins/trunctfbf2.c
+  BFLOAT16_SRCS += compiler-rt/compiler-rt/lib/builtins/truncxfbf2.c
+  BFLOAT16_SRCS += compiler-rt/compiler-rt/lib/builtins/extendbfsf2.c
   CSRCS := $(filter-out $(BFLOAT16_SRCS), $(CSRCS))
 endif
 
@@ -107,6 +110,7 @@ ifeq ($(CONFIG_ARCH_X86_64),)
   x86_80_BIT_SOURCES := divxc3.c extendxftf2.c fixxfdi.c fixxfti.c fixunsxfdi.c
   x86_80_BIT_SOURCES += fixunsxfsi.c fixunsxfti.c floatdixf.c floattixf.c 
floatundixf.c
   x86_80_BIT_SOURCES += floatuntixf.c mulxc3.c powixf2.c trunctfxf2.c
+  x86_80_BIT_SOURCES += extendhfxf2.c truncxfhf2.c truncxfbf2.c
   x86_80_BIT_SOURCES := $(addprefix compiler-rt/compiler-rt/lib/builtins/, 
$(x86_80_BIT_SOURCES))
   CSRCS := $(filter-out $(x86_80_BIT_SOURCES), $(CSRCS))
 endif

Reply via email to