[compiler-rt] [M68k][compiler-rt] Allow compiler-rt builtins to be built for M68k (PR #169256)
Daniel Thornburgh via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 23 16:09:25 PST 2025
https://github.com/mysterymath created https://github.com/llvm/llvm-project/pull/169256
I've tested this locally, and the builtins build proceeds without a hitch for m68k-none-none. This is part of a larger effort to establish a working m68k baremetal toolchain.
>From 42a3d2c56abd7689076f6b29c678bbfc093fd8a7 Mon Sep 17 00:00:00 2001
From: Daniel Thornburgh <mysterymath at gmail.com>
Date: Fri, 14 Nov 2025 17:17:34 -0800
Subject: [PATCH] [M68k][compiler-rt] Allow compiler-rt builtins to be built
for M68k
I've tested this locally, and the builtins build proceeds without a
hitch for m68k-none-none. This is part of a larger effort to establish a
working m68k baremetal toolchain.
---
compiler-rt/cmake/builtin-config-ix.cmake | 3 ++-
compiler-rt/lib/builtins/CMakeLists.txt | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/compiler-rt/cmake/builtin-config-ix.cmake b/compiler-rt/cmake/builtin-config-ix.cmake
index eaff8135cff45..238749681a6ca 100644
--- a/compiler-rt/cmake/builtin-config-ix.cmake
+++ b/compiler-rt/cmake/builtin-config-ix.cmake
@@ -98,6 +98,7 @@ set(SPARCV9 sparcv9)
set(WASM32 wasm32)
set(WASM64 wasm64)
set(VE ve)
+set(M68K m68k)
if(APPLE)
set(ARM64 arm64 arm64e)
@@ -109,7 +110,7 @@ set(ALL_BUILTIN_SUPPORTED_ARCH
${X86} ${X86_64} ${AMDGPU} ${ARM32} ${ARM64} ${AVR}
${HEXAGON} ${MIPS32} ${MIPS64} ${NVPTX} ${PPC32} ${PPC64}
${RISCV32} ${RISCV64} ${S390X} ${SPARC} ${SPARCV9}
- ${WASM32} ${WASM64} ${VE} ${LOONGARCH64})
+ ${WASM32} ${WASM64} ${VE} ${LOONGARCH64} ${M68K})
include(CompilerRTUtils)
include(CompilerRTDarwinUtils)
diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt
index e781c2460e488..aa2a2519afc02 100644
--- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -881,6 +881,8 @@ set(ve_SOURCES
${GENERIC_TF_SOURCES}
${GENERIC_SOURCES})
+set(m68k_SOURCES ${GENERIC_SOURCES})
+
add_custom_target(builtins)
set_target_properties(builtins PROPERTIES FOLDER "Compiler-RT/Metatargets")
More information about the llvm-commits
mailing list