From 104662dd8a1ef160342a5d0c05c57e984e6cabe7 Mon Sep 17 00:00:00 2001 From: LLVM Packaging Team Date: Fri, 22 Jul 2022 14:10:20 +0100 Subject: [PATCH] D98575 Gbp-Pq: Name D98575.patch --- compiler-rt/cmake/base-config-ix.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/compiler-rt/cmake/base-config-ix.cmake b/compiler-rt/cmake/base-config-ix.cmake index 3ca9dc0f55..f1edf5c707 100644 --- a/compiler-rt/cmake/base-config-ix.cmake +++ b/compiler-rt/cmake/base-config-ix.cmake @@ -214,8 +214,12 @@ macro(test_targets) elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "s390x") test_target_arch(s390x "" "") elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "sparc") - test_target_arch(sparc "" "-m32") - test_target_arch(sparcv9 "" "-m64") + if (CMAKE_SIZEOF_VOID_P EQUAL 4) + test_target_arch(sparc "" "-mcpu=v9" "-m32") + append("-latomic" CMAKE_LD_FLAGS) + else() + test_target_arch(sparcv9 "" "-m64") + endif() elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "mipsel|mips64el") # Gcc doesn't accept -m32/-m64 so we do the next best thing and use # -mips32r2/-mips64r2. We don't use -mips1/-mips3 because we want to match -- 2.30.2