[compiler-rt] [SPARC][builtins] Add sparcv9 arch name for 32-bit SPARC (PR #170133)

via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 1 05:27:55 PST 2025


https://github.com/koachan created https://github.com/llvm/llvm-project/pull/170133

Solaris uses it, and its lack results in undefined symbols error in the linker.
This should fix the failures in the Solaris buildbot.

>From d6c81c51e4f9c9a22fdcc8a0b6dc325288dae30e Mon Sep 17 00:00:00 2001
From: Koakuma <koachan at protonmail.com>
Date: Mon, 1 Dec 2025 19:53:38 +0700
Subject: [PATCH] [SPARC][builtins] Add sparcv9 arch name for 32-bit SPARC

Solaris uses those, and the lack of it results in undefined symbols error
in the linker.
This should fix the failures in the Solaris buildbot.
---
 compiler-rt/lib/builtins/CMakeLists.txt  | 2 +-
 compiler-rt/test/builtins/CMakeLists.txt | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt
index 7e8621855eb84..c4283d2659502 100644
--- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -1013,7 +1013,7 @@ else ()
 
       # For RISCV32 and 32-bit SPARC, we must force enable int128 for compiling long
       # double routines.
-      if (COMPILER_RT_ENABLE_SOFTWARE_INT128 OR ("${arch}" MATCHES "riscv32|sparc$"
+      if (COMPILER_RT_ENABLE_SOFTWARE_INT128 OR ("${arch}" MATCHES "riscv32|sparc|sparcv9"
         AND NOT CMAKE_COMPILER_IS_GNUCC))
         list(APPEND BUILTIN_CFLAGS_${arch} -fforce-enable-int128)
       endif()
diff --git a/compiler-rt/test/builtins/CMakeLists.txt b/compiler-rt/test/builtins/CMakeLists.txt
index 36135c7905900..6b27031af4de8 100644
--- a/compiler-rt/test/builtins/CMakeLists.txt
+++ b/compiler-rt/test/builtins/CMakeLists.txt
@@ -48,7 +48,7 @@ foreach(arch ${BUILTIN_TEST_ARCH})
     string(REPLACE ";" " " BUILTINS_TEST_TARGET_CFLAGS "${BUILTINS_TEST_TARGET_CFLAGS}")
   endif()
 
-  if (COMPILER_RT_ENABLE_SOFTWARE_INT128 OR ("${arch}" MATCHES "riscv32|sparc$"
+  if (COMPILER_RT_ENABLE_SOFTWARE_INT128 OR ("${arch}" MATCHES "riscv32|sparc|sparcv9"
     AND NOT CMAKE_COMPILER_IS_GNUCC))
     list(APPEND BUILTINS_TEST_TARGET_CFLAGS -fforce-enable-int128)
     string(REPLACE ";" " " BUILTINS_TEST_TARGET_CFLAGS "${BUILTINS_TEST_TARGET_CFLAGS}")



More information about the llvm-commits mailing list